Stick a Footer to the Bottom – HTML5

Below is some updated/streamlined code of my earlier post on how to stick a footer to the bottom of a page whose content is not sufficient to push below the fold. Its using some HTML5 features like the ‘footer’ & ‘header’ tags & lightweight doctype. I’ve embedded the CSS but you can link to an external file. It also has a script to create the HTML5 elements in older Microsoft browsers. Its been tested on modern browsers & seems to work fine….hope it helps.

Hi,
Nice and simple solution. Will ditch my current one in favor of this. Gonna give it a try

Btw, in the code above the class properties are missing from the divs? Shouldn’t it be:

This is my header!
This is my content!

Also, looking at several examples on the web, I’ve been wondering what the advantage of using classes instead of IDs was? For instance the wrapper and content div are most certainly to be used only once per page, why not have them as ids? Just wondering…
Best wishes,
Alex