html - Div height equal to another div max-height -
i have 3 divs:
<div id="main"> <div id="one"></div> <div id="two"></div> </div>
- div "one" contains content height 300px example.
- div "two" contains more or less content height 400px example.
- both content changing, it's not static cannot calculate
heights manually. - style of div "two" contain "overflow-y: scroll;"
how create div "two" same height div "one" can smaller or bigger?
here quick sketch:
using javascript, like:
document.getelementbyid("two").style.height = document.getelementbyid("one").clientheight;
Comments
Post a Comment