Tuesday, July 17, 2007

snap footer to bottom of viewport

Previously, on our pages with short content the footer would not always appear at the bottom of the viewport (browser). I was able to fix this with a little css wizardry.

I do, however, feel that this functionality should be built into the standard and therefore the browser but thats the subject for another post.

I surrounded all non-footer content in a "page" div and the footer in a "footer" div here is the css:

.Page {
height: 80%;
position: relative;
}

div.Footer{
width:100%;
float:left;
height:174px;
margin-top:15px;
position: relative;
}


This seemed to do the trick despite the many more complex solutions posted around town.

No comments: