tags:

views:

270

answers:

2

Hi, Is anyone know how to convert the height of TR element which is in AUTO to pixel or percentage?

+1  A: 

Do you mean at run time using JS or in the development phase?

You could always use the ruler made available in the Web Developer tool bar to measure it, and then use that value in your CSS.

Or, any calculating using JS for the height of a tr element should return it in pixels.

alex
In ie6 this doesn't work until after the document is displayed. Before that, the height has a value of 'auto'.
Eric Johnson
+1  A: 

using jquery its trivial.



  myTrHeight = $("#myTr").height()

that will give you the height in pixels.

shit a birck
This doesn't work. As the question said, it has a value of 'auto'
Eric Johnson
Actually this does work in most browsers, but not in IE6. I tried it. :)
Eric Johnson