tags:

views:

106

answers:

2

I've fixed my footer DIV to the bottom of the viewport as follows:

#Footer
{
    position: fixed;
    bottom: 0;
}

This works well if there isn't much content on the page. However, if the content fills the full height of the page (i.e. the vertical scroll bar is visible) the footer overlaps the content, which I don't wont.

How can I get the footer to stick to the bottom of the viewport, but never overlap the content?

+6  A: 

Try using CSS Sticky Footer.

Justin Ethier
@Justin: +1 for the great link.
Robusto
+1: I've used this exact technique in several projects I've worked on. There's even a SASS extension for it in the Compass module.
Damien Wilson
Perfect, thanks.
Robert Morgan
A: 

Maybe this will help you: CSS fixed footer.

Kyle Sevenoaks