View Full Version : Layer resize problem..

08-22-2002, 01:32 PM
I have the following JS function which onload checks the size of two divs that are side by side, and resizes the smaller one to the same size as the larger div, so that they appear to be the same height.

function resizeDiv(){
var focusHT = document.getElementById("focus").offsetHeight;
var thesHT = document.getElementById("thes").offsetHeight;
if(focusHT < thesHT){
document.getElementById("focus").style.height = thesHT-20;
}else if(focusHT > thesHT){
document.getElementById("thes").style.height = focusHT-20;

...which works fine in IE. My question is - what attributes should I be using instead of offsetHeight to intially read the height of each div in netscape/mozilla? I also tried replacing offsetHeight with height and clientHeight, but that didnt work either...

08-22-2002, 02:21 PM
Try this link (http://www.xs4all.nl/~ppk/js/doctypes.html)

08-23-2002, 12:47 AM
Nope, that wasnt useful I tried most ways and still cant emplement it right, any help with the script, any one get this working? please if you could, muchly appreciated