CSS: How to make a footer which really stays on the bottom

One problem Jonathan Longnecker run into pretty frequently when coding a site in to XHTML and CSS is making his footer dock to the bottom of the screen. It’s especially annoying if you have a page that’s short on content and the footer, which happens to be a different color that the body background doesn’t stay at the bottom of the browser window:

I can hear you say, “But why don’t you just do a fixed position on it. That’s easy enough.” True, but if you do that then it’s always at the bottom of the screen no matter how tall the window is. So if I have a page with a lot of content that footer shouldn’t show up until the content is done. How do we fix this? Let me show you. Here’s what the problem looks like:

Footer is broken

This tutorial assumes a few things: 1. That you know basic HTML formatting, and 2. That you have a pretty good understanding of CSS.

Please also consider to check out another method called sticky footer.

Spread this KnowTe

Digg Del.icio.us Stumble Float Technorati Bump
Whatever you want to say!

House Music
Mar 22, 2010
No: 7 / ID: 5873

Thanks for the article, helpful to me. :D


Richard
Dec 09, 2009
No: 6 / ID: 5333

Hey I have one on Digitalmarketechs.com but its not as cool as yours.!! nice footer bar!! sem


Schalk
Nov 27, 2009
No: 5 / ID: 5280

That’s what I am looking for… How do you get the footer bar on your page with twitter etc. Did you design from scratch or is there a plugin?

Thanks


Knowtebook
Oct 27, 2009
No: 4 / ID: 5133

hey. check out http://www.wibiya.com/


Amaresh Das
Oct 25, 2009
No: 3 / ID: 5117

HI ,

I want to make a footer like your site footer,

I mean in bottom, you have made one toolbar like, where search, recept post, random post, twitter and so on …

I want made it like it ..

will you guide me how to make it ?

Please mail me :amareshchandradas2005@gmail.com


brindes
May 28, 2009
No: 2 / ID: 4320

Hi.
I don’t have a “pretty good understanding” of CSS. Is this kind of knowledge required for the other option (Sticky Footer) too ?

Thanks.

Leave a comment!
Note: You can also use your free Gravatar avatar on Knowtebook! Please also read our Publishing Policy before posting.

Ja, ich möchte bei Kommentaren benachrichtigt werden!

Trackbacks/Pings
Trackback-URL