W3C home > Mailing lists > Public > www-style@w3.org > March 2005

position:fixed and same-document references

From: Anne van Kesteren <fora@annevankesteren.nl>
Date: Thu, 10 Mar 2005 19:03:28 +0100
Message-ID: <42308BF0.4050600@annevankesteren.nl>
To: W3C CSS List <www-style@w3.org>

I was experimenting a bit with 'position:fixed' on my personal site and 
some other things and I re-discovered an "annoying bug."

Lets say you have a fixed header to simulate frames or so. Since every 
standards advocate out there is saying CSS can replace frames I guess 
people might try it out.

  #header{
   position:fixed
   width:100%;
   height:5em;
  }

Now lets say you have a link to the comments on a post. That link is a 
same-document reference since the comments are on the same page as the 
post. The link is |#comments|.

Obviously, it links to something that is hidden under the header if the 
object it links to is smaller than 5em in height

A solution for this "problem" would be very helpful. I'm not sure if the 
CSS WG should deal with it though. If not, please let me know and I'll 
forward it to some other WG.

...

I have discussed the problem with some other people as well and a 
solution is probably not easy, if not impossible. Perhaps 
'position:fixed' should not be recommended for replacing frames at all.

(Although I guess, when @viewport arrives, you could have a special 
attribute that says how much space should be reserved at the top.)


-- 
  Anne van Kesteren
  <http://annevankesteren.nl/>
Received on Thursday, 10 March 2005 18:03:53 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:36 GMT