Guys, I have a CSS Layout that I am using that has a header, footer and a sidebar on the left. It works great, but the only problem is, I would like the sidebar and the footer to extend to the bottom of the screen if there is not enough content to fill the main content. How do I do this in CSS? I have posted the css here so you can see what I'm working with:
<style type="text/css">
body
{
font: 100% Verdana, Arial, Helvetica, sans-serif;
background: #666666;
margin: 0;
padding: 0;
text-align: center;
color: #000000;
}
.twoColHybLtHdr #container
{
width: 80%;
background: #FFFFFF;
margin: 0 auto;
border: 1px solid #000000;
text-align: left;
}
.twoColHybLtHdr #header
{
background: #DDDDDD;
padding: 0 10px;
}
.twoColHybLtHdr #header h1
{
margin: 0;
padding: 10px 0;
}
.twoColHybLtHdr #sidebar1
{
float: left;
width: 8em;
background: #EBEBEB;
padding: 15px 0;
}
.twoColHybLtHdr #sidebar1 h3, .twoColHybLtHdr #sidebar1 p
{
margin-left: 10px;
margin-right: 10px;
}
.twoColHybLtHdr #mainContent
{
margin: 0 20px 0 9em;
}
.twoColHybLtHdr #footer
{
padding: 0 10px;
background: #DDDDDD;
}
.twoColHybLtHdr #footer p
{
margin: 0;
padding: 10px 0;
}
.fltrt
{
float: right;
margin-left: 8px;
}
.fltlft
{
float: left;
margin-right: 8px;
}
.clearfloat
{
clear: both;
height: 0;
font-size: 1px;
line-height: 0px;
}
</style>
And an example of how to use it:
<div id="container">
<div id="header" style="text-align: center"> Header goes here </div>
<div id="sidebar1">Sidebar is here</div>
<div id="mainContent">Main Content here</div>
<br class="clearfloat" />
<div id="footer">Footer Here</div>
</div>