I have four divs for a layout, looking like this:
Now, at the moment, the menu and content divs are the same height no matter what content is shown. They are fixed, as you can see, at 450px. When content overruns this, a scrollbar is created and the div stays the same height.
What I would like, is for when the content is longer than 450px, then the "content" and "menu" divs will expand vertically (ie. increase in height) to accommodate this.
However, I would also like the div to have a minimum value of 450px. Ie, the div cannot be "shorter" than 450px.
How would I go about doing this?
TIA,
Jon
Code:
#header {
color: #333;
width: 910px;
float: left;
padding: 5px;
border: 1px solid #ccc;
height: 75px;
margin: 10px 0px 5px 0px;
background: #BD9C8C;
}
#menu {
color: #333;
border: 1px solid #ccc;
background: #E7DBD5;
margin: 0px 5px 5px 0px;
padding: 10px;
padding-left: 30px;
height: 450px;
width: 150px;
float: left;
}
#content {
float: right;
color: #333;
border: 1px solid #ccc;
background: #F2F2E6;
margin: 0px 0px 5px 0px;
padding: 10px;
padding-left: 20px;
height: 450px;
width: 690px;
display: inline;
overflow:auto;
}
#footer {
width: 910px;
height: 20px;
clear: both;
color: #333;
border: 1px solid #ccc;
background: #BD9C8C;
margin: 0px 0px 0px 0px;
padding-right: 5px;
padding-left: 5px;
text-align:right;
}
Now, at the moment, the menu and content divs are the same height no matter what content is shown. They are fixed, as you can see, at 450px. When content overruns this, a scrollbar is created and the div stays the same height.
What I would like, is for when the content is longer than 450px, then the "content" and "menu" divs will expand vertically (ie. increase in height) to accommodate this.
However, I would also like the div to have a minimum value of 450px. Ie, the div cannot be "shorter" than 450px.
How would I go about doing this?
TIA,
Jon