Here is my code.
HTML:
<div class="div1">
<div class="div2">
Div2 starts <br /><br /><br /><br /><br /><br /><br /> Div2 ends
</div>
<div class="div3">
Div3
</div>
</div>
CSS:
.div1 {
width: 300px;
height: auto;
background-color: grey;
border: 1px solid;
overflow: auto;
}
.div2 {
width: 150px;
height: auto;
background-color: #F4A460;
float: left;
}
.div3 {
width: 150px;
height: auto;
background-color: #FFFFE0;
float: right;
}
I want to increase the height of div3
dynamically.
For example, if the height of div1
is 500px
then the height of div3
should be 500px
. I know, I can use inherit, but the height of div1
is auto
so it won't help.
Here is my fiddle http://jsfiddle.net/prashusuri/E4Zgj/1/
How to do this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…