Posted by Steve Pugh on 03/18/06 13:25
"Simon" <spambucket@example.com> wrote:
>As you can see my footer is not at the bottom.
><div id="Layer2" style="position:absolute; left:408px; top:420px;
>width:377px; z-index:3;">
And this is why. Absolutely positioned elements are taken out of the
document flow and hence are not taken into consideration when laying
out the rest of the page. If your absolutely positioned element
contains flexible content (i.e. any text) you can't give it a fixed
height. Hence you can't know how tall it will be and hence you can't
reliably position anything below it on the page.
So if you want a footer, you need to stop using absolute positioning.
Steve
--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor
Steve Pugh <steve@pugh.net> <http://steve.pugh.net/>
[Back to original message]
|