Lock the footer to the bottom of viewport

The footer will sit at the bottom of the viewport unless the content pushes it down. Put your whole page in #main, everything except the footer.

Please note that this type of thing is a holdover from graphic design for print, and is not really appropriate for use on the web.