Previous Message
Next Message

position:absolute - to the document or the viewport?

Sent by Alisha on 14 March 2006 12:12

Hi, I have no idea why I didn't run into this earlier, but than it's 
happening and I really need a "lesson" about it.

I though when I have something like this

<div id="container">
<div id="extra1">

if I were to position the #extra1 div to the bottom of the document I 
just had to put in the css something like

html, body {
height:auto !important ;

so that the min-height on mozilla/firefox would have been 100%, which I 
assume is 100% of the viewport if there's no content which makes it 
higher, the height though, if it were more than just the viewport 
because of longer content it would have stretch because of the 
height:auto and the !important was to make browsers which understant it 
to overwrite the next instruction of height:100%, which was for explorer 
since it considers height as min-height.

then i would put something like this into the css to position the 
#extra1 at the very bottom of it all

#extra1 {
    position: absolute;

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. so if 
the content of the document is shorter than the viewport, fine it stays 
at the very bottom of the screen, but if I resize the window making it 
shorter than the content of the document itself, well it just follows 
the viewport.
I though making body, html and everything with height/min-height of 100% 
would have worked...
why not? what's the reason of this and what should I do to accomplish 
what I expected?

Thanks to everyone in advance


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

Message thread: