Keeping your footer at the bottom of the page

Are you looking for a simple way of making sure your footer stays at the bottom of the browser viewport whilst also ensuring that it drops below the bottom of the viewport if your content is longer than the viewport?

If you are, the perfect, cross-browser compatible, hack-free method exists and has been created by Matthew James Taylor.

It’s quite an old article, but it still works and I keep forgetting where to find it so I’m posting it here for reference!

How to keep footers at the bottom of the page

It’s a method handled by simple valid CSS rules, a straight-forward HTML structure which you’re probably already using, and one small conditional rule for IE6/5.5.

Comments