Preventing fixed footer from overlapping content

Posted by Robert Morgan on Stack Overflow See other posts from Stack Overflow or by Robert Morgan
Published on 2010-04-30T13:10:27Z Indexed on 2010/04/30 13:17 UTC
Read the original article Hit count: 181

Filed under:
|

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?

© Stack Overflow or respective owner

Related posts about html

Related posts about css