L
laszlokenez
Tested in IE7 and FF2. I have 2 frames, 2 similar tables in them,
similar CSS. (I have 1px cellpadding, and 1px border aroud the cells.
From one frame I read the offsetHeight of a cell (getElementById), and
set the height of the corresponding cell in the other frame. Here:
window.parent.frames["lft"].document.getElementById('r2').style.height=(document.getElementById('r2'i).offsetHeight)
+ 'px';
Everything works perfectly, cell gets resized, BUT then I read back
the height of both cells, here:
alert(document.getElementById('r2').offsetHeight + ' - ' +
window.parent.frames["lft"].document.getElementById('r2').offsetHeight );
In FireFox it returns 17 and 17 pixels, perfect. But IE7 returns 17
and 20 pixels (17 for the original cell, 20 for the newly resized
cell)! And they don't align! Why?
Why do the browsers act differently? And how could I compensate the
difference? Checking for IE and then substract 3 pixels doesn't feel
like a safe solution.
Any explanation or solution for this?
similar CSS. (I have 1px cellpadding, and 1px border aroud the cells.
From one frame I read the offsetHeight of a cell (getElementById), and
set the height of the corresponding cell in the other frame. Here:
window.parent.frames["lft"].document.getElementById('r2').style.height=(document.getElementById('r2'i).offsetHeight)
+ 'px';
Everything works perfectly, cell gets resized, BUT then I read back
the height of both cells, here:
alert(document.getElementById('r2').offsetHeight + ' - ' +
window.parent.frames["lft"].document.getElementById('r2').offsetHeight );
In FireFox it returns 17 and 17 pixels, perfect. But IE7 returns 17
and 20 pixels (17 for the original cell, 20 for the newly resized
cell)! And they don't align! Why?
Why do the browsers act differently? And how could I compensate the
difference? Checking for IE and then substract 3 pixels doesn't feel
like a safe solution.
Any explanation or solution for this?