I have two divs, neither have a height set in css, as I want to take whatever height they end up as and set the other div to be that height.
The javascript I have is
Use offsetHeight - http://jsfiddle.net/HwATE/
offsetHeight
function fixHeight() { var divh = document.getElementById('prCol1').offsetHeight; /* change this */ document.getElementById('prCol1').innerHTML = '' + divh + ''; document.getElementById('prCol2').style.height = divh + 'px'; }