PDA

View Full Version : dynamic table size


azqnow
08-03-2006, 04:11 AM
I have two totally unrelated tables that needs to automatically adjust depending on the size of the other...

I tried using document.getElementById('mirroringTable').style.height = document.getElementById('originalTable').offsetHeight

among other things.. is there a better way to do this?

when I put
alert(document.getElementById('originalTable').offsetHeight) it outputs the right height but the problem is

document.getElementById('mirroringTable').style.height

doesn't seem to be getting the values from the equation...

can I just do this in css? a dynamic css code? instead of editing it in <script language="javascript"> ??



Thanks

RexxCrow
08-03-2006, 05:46 AM
what about using something similar to: whitespace: no-wrap; padding: Xpx; that will keep text from wrapping and ensure text does not bump into the borders, are to the tables need to be even to one another? Also maybe even use a min-width: Xpx/min-height: Xpx rule as well?

azqnow
08-03-2006, 08:39 AM
what about using something similar to: whitespace: no-wrap; padding: Xpx; that will keep text from wrapping and ensure text does not bump into the borders, are to the tables need to be even to one another? Also maybe even use a min-width: Xpx/min-height: Xpx rule as well?

they are unrelated.. their size would not intersect.. the designs must conform to the dynamic content... so that solution doesn't work..