I have a float: left
siderbar <div>
that has min-height
set to 500px
.
The content area <div>
to the left of it also has min-height
of 500px
.
What I can't seem to figure out is this: if the height of the content <div>
goes over 500px due to longer page content, how do I get the sidebar <div>
to grow downward pixel-for-pixel, matching the height of the content <div>
, so that it is still touching the footer <div>
that is below both of those (it uses clear: both
)?
I could use a table to do this, but I'd really rather find the CSS to do it more... "properly."
The current CSS for the content, sidebar, and footer <div>
's:
#ContentHolder
{
float:left;
padding-left: 10px;
width: 590px;
min-height: 500px;
}
#SideBar
{
float: left;
width: 200px;
min-height: 500px;
background-color: #4a4a4a;
border-top: 2px solid #404040;
border-top-left-radius: 7px;
background-image: url('Images/SideBar.gif');
background-repeat: repeat-x;
background-position: bottom;
}
#Footer
{
clear: both;
background: #404040;
font-size: 10px;
height: 30px;
text-align: center;
line-height: 30px;
color: #707070;
text-shadow: 0 1px 0 #202020;
}