Monday, 9 September 2013

Footer bottom of page CSS

Footer bottom of page CSS

In this fiddle I want to create a footer that stays at the bottom of the
page, as in this screenshot:

However, when the browser window is minimized so that the viewport is less
than the content area, and the page is scrollable, the footer stays in the
middle of the page rather than below the content. Once a user scrolls, the
footer stays in the middle of the content boxes, like in this screenshot:

How do I create a footer that stays at the bottom of the viewport when
there is no scrollbar, but then stays at the bottom of the content boxes
when a scrollbar appears and content is outside the viewport?
I am using position:absolute; bottom:0; on the footer. Do I need to add
declarations to my content box, or to the footer? Thanks for your help!

No comments:

Post a Comment