Hi people,
How can I place the footer as a block element at the bottom of the web page in a fixed position?
| SitePoint Sponsor |
Hi people,
How can I place the footer as a block element at the bottom of the web page in a fixed position?
in your CSS:
In your HTMLCode:#footer{ position:absolute; bottom:0px; margin-top:auto; }
That seems to work ok my endCode:<div id="footer">Hello</div>(FireFox 3)
Edit: just found this ( http://ryanfait.com/resources/footer...ottom-of-page/ ) it's a useful link.
Last edited by Rogem; Mar 1, 2009 at 16:48.
My Blog/Site: Full On Design
What I actually meant is that when I scroll the page, the footer should remains fixed at the bottom of the web page. How do I do it?


This won't work in IE6 and older, since those versions don't support fixed positioning. You'll either need an ugly workaround or use JavaScript for that, but you could also accept that it won't work in those browsers that are more than 8 years old.Code CSS:#footer { position:fixed; bottom:0; left:0; width:100%; }
Birnam wood is come to Dunsinane
Bookmarks