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:

simple sketch

using javascript, like:

document.getelementbyid("two").style.height = document.getelementbyid("one").clientheight; 

Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -