Search code examples
htmlcssfooter

Color underneath website footer


Possible Duplicate:
How do you get the footer to stay at the bottom of a Web page?

I've been helping a guy with the website here. If you'll notice, the on some pages (like this) the footer has some large whitespace underneath it, because the page is short.

How can we get the black in the footer to extend all the way down regardless of page height (and window/browser height?)

note: We don't want a sticky footer


Solution

  • I don't know of any reliable method to have the footer extend to the bottom of the page. However, to get the effect you desire, you could do the following:

    • Apply black background to body
    • Apply white background to #primary
    • Swap top margin of footer for bottom padding on #primary