The Pro CSS and HTML Design
Patterns book promotion caught my eye because I'm struggling with a CSS issue. The goal was to fill the screen vertically and put the footer on the bottom of the screen. Sounds simple, right? I backed out the code (below) because it did not work on Firefox. It was fine on IE, but on Firefox the footer was in the middle of large content, or partially covered part of the content div when to switched the position to relative. Also, the height calculation in FireFox did not seem to account for the header so the user had to scroll to see to whole page.
I'm not looking for any troubleshooting here... I'm looking for a recommendation where I might find a proven, full-screen two-column CSS layout with a header and footer at the top and bottom of the window that is cross-browser compatible. I found a couple of sites that used JavaScript hacks to calculate screen height and dynamically position the footer. Surely there is another way?
Thanks,
Steve Mitchell
http://www.byteworksinc.com CSS...
html, body {
height:100%;
margin:0pt;
padding:0pt;
}
body {
font-size:76%;
}
div#container {
min-height: 100%;
}
div#menu {
float:left;
width:230px;
}
div#content {
height:auto;
margin-left:230px;
}
div#footer {
bottom:0pt;
clear:left;
height:21px;
position:relative;
width:100%;
}
Additional HTML...
<!--[if lte IE 6]>
<style type="text/css">
#content { height: 100%; }
</style>
<![endif]-->