W3C home > Mailing lists > Public > www-style@w3.org > November 2004

Re: [CSS21] Contradiction in the spec with auto-offset fixed-position elements

From: Ian Hickson <ian@hixie.ch>
Date: Sun, 7 Nov 2004 03:45:38 +0000 (UTC)
To: Boris Zbarsky <bzbarsky@MIT.EDU>
Cc: www-style@w3.org
Message-ID: <Pine.LNX.4.61.0411070341460.8631@dhalsim.dreamhost.com>

On Sat, 6 Nov 2004, Boris Zbarsky wrote:
> 
> <root>
> <node style="position: fixed">Fixed</node>
> 
> When laying this out, per section 10.6.4 [2] the UA must compute the 
> hypothetical box of the <node /> element, then figure out the offset of 
> that box from the top of the viewport, and use that offset as the 
> computed value for "top".

# For the purposes of calculating the static position, the containing 
# block of fixed positioned elements is the initial containing block 
# instead of the viewport.
 -- http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height

So you work out the position as it would have been relative to the top of 
the initial containing block (in this particular case, a box at the canvas 
origin, with the size of the viewport) and then you place the box relative 
to the viewport, using that offset.

That's a fancy way of saying that the static position of a fixed-
positioned box is its initial position before scrolling, and that 
subsequent scrolling doesn't affect it.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Sunday, 7 November 2004 03:45:41 GMT

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