Previous Message
Next Message

position:absolute - to the document or the viewport?

Sent by David Dorward on 14 March 2006 13:01

On 14/03/06, Alisha [EMAIL-REMOVED]> wrote:
> #extra1 {
>     position: absolute;
>     bottom:0;
>     right:0;
> }
> well.. if I do something like this I can't get the effect I was kinda
> sure "position:absolute" was especially made to obtain.
> the #extra1 stays at the bottom, but the bottom of the viewport.

Absolute positioning is done with respect to the edges of the
"containing block". This is the first ancestor element which is
"positioned". "Positioned" means "Has a value for the position
property other than "static".

If there is no containing block then positioning is with respect to
the region bounded by the viewport when the browser is scrolled to the

The solution is to set the position property to something other than
static (relative is the usual choice) on the body. (I don't do this
often, but I have a feeling that MSIE objects to it).

David Dorward <><>
css-discuss [EMAIL-REMOVED]]
IE7b2 testing hub --
List wiki/FAQ --
Supported by --
Previous Message
Next Message

Message thread: