I have the following DIVs structure:
<div id="d1">
<div id="d2">
</div>
<div id="d3">
<div id="d4"></div>
<div id="d5"></div>
</div>
</div>
DIV d2 is the left column (float: left), while d3 is on the right (float: right). d4 and d5 all go into right column d3, one below the other. The widths are all fixed.
DIVs d4 has fixed height of 300px. The content of div d2 has dynamic height but it is at least 300px high. My goal is to make DIV d5's height to fill the remaining space in the right column (d3) so that the total height of this column is equal to the dynamic height of the left column (d2).
I would like a pure CSS solution, no JS.
This is the CSS I am using:
#d1 {
width: 990px;
border: 1px solid black;
background-color: pink;
}
#d2 {
float: left;
width: 300px;
background-color: yellow;
}
#d3 {
float: right;
width: 690px;
}
#d4 {
background-color: blue;
width: 690px;
height: 300px;
}
#d5 {
background-color: brown;
width: 690px;
}