Previous Message
Next Message

Need Footer to always go to bottom

Sent by David Hucklesby on 28 December 2009 05:05


On 12/27/09 8:03 PM, J.M. Knowles wrote:
> Probably an easy way to do this that I am spacing on - but how do I get
> my footer http://www.rodolfflaw.com/test2015/ to always align to the
> bottom of the page regardless of how big the window is set at?

Try this:
HTML
<div id="container">
     <div id="content">...</div>
     <div id="footer">...</div>
</div>

CSS
html, body {
     height: 100%;
}
#container {
     position: relative;
     min-height: 100%;
}
#footer {
     position: absolute;
     bottom: 0;
}

A flaw in IE 6 makes the #container adopt the height of its parent (in 
standards mode). So the fact it does not apply min-height does not matter.

I see you have already added some padding to the bottom of #content. 
That's good, because the #footer will overlap it when the browser window 
is shorter.

Cordially,
David
--


______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread: