homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

Footer at absolute bottom of page? (not "fixed")
Getting a footer to be at the bottom but not interfere with scrolling.

5+ Year Member

Msg#: 3880456 posted 11:46 pm on Mar 27, 2009 (gmt 0)

I want to put a footer on a page but I can't seem to get it to go right to the bottom.

I want it to be locked at the very bottom of the page.
Unfortunately the only way I know of doing this is with "fixed" positioning, and that will mess up the way the page scrolls since the footer will always be there.

What I want is for it only to appear once you reach the bottom of the page. I just don't want pixels to be left between the footer and the bottom of the page.

I hope my explanation makes sense. Anyone know of a way?



WebmasterWorld Senior Member swa66 us a WebmasterWorld Top Contributor of All Time 10+ Year Member

Msg#: 3880456 posted 2:11 am on Mar 28, 2009 (gmt 0)

It's pretty easy to get this done, and both cases need more or less the same solution.

If you use position:fixed, you need additional padding on the content's bottom in order for it to clear the fixed footer.

If you use absolute positioning you also need that same padding.

For an example, take a look at post #3878112 in [webmasterworld.com...] (message 39 or so in that long thread)


5+ Year Member

Msg#: 3880456 posted 9:28 pm on Mar 30, 2009 (gmt 0)

Give the body and footer a bottom margin of 0. Does that do the trick?

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved