Thread: 100% height
View Single Post
03-31-2007, 05:05 AM
#5
jjmac is offline jjmac
jjmac's Avatar
Status: Member
Join date: May 2006
Location:
Expertise:
Software:
 
Posts: 197
iTrader: 0 / 0%
 

jjmac is on a distinguished road

  Old

Remember, 100% means 100% of the viewport, not the page size. In otherwords, the number of pixels in height the browser has when it opens the page. If your content goes longer and causes scroll bars, your "footer" will be stuck in the middle of the content somewhere assuming you're using absolute positioning. Relative positioning will give you quirky results.

I came across this some time ago, it's 100% CSS and it puts your footer at the bottom of all the content, regardless of the browser size etc. It works well.

http://www.themaninblue.com/experiment/footerStickAlt/

The difference between this and just simply putting a footer at the bottom of the page, is that if your content does not fill up the viewport, the footer will still be at the very bottom of the browser instead of just below the end of the content. Hope that makes sense.