How can I find the size of a table cell with javascript
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/5221831/how-can-i-find-out-the-size-of-a-cell-with-javascript">How can i find out the size of a cell with javascript</a>  </p>
</blockquote>



<p>I want to find the width of a table header. when I do this  <code>var width = $('myTH').width</code> it returns "12%" but i want to return the width in pixles. How can I do that? I cant change the width of the <code>&lt;th&gt;</code> to pixles because i want them to be in percentages so they resize with the screen.</p>

<p>i am using jquery-1.5.js when i do something like $('#myTH') i get an error. I dont knwo if this is related but it means i couldnt use methods suggested to me like <code>$('#myTH').width()</code> or <code>$('#myTH').outerWidth()</code> i get an error "object does not support this property or method" i am guessing it's the # sign</p>

<p><strong>EDIT:</strong></p>

<pre><code>&lt;th id="telephoneTH" width="25%" &gt;
&lt;span  id="telephoneSpan" class="headerShortDetails"&gt;Telephone&lt;/span&gt;&lt;span onclick="showContactPopup();"  class="infoSpans"&gt; ${bean.phoneNumber}&lt;/span&gt;
&lt;/th&gt;


var width2 = $('#telephoneTH').outerWidth();
alert(width2);
</code></pre>

<p>I get an error 'null' is null or not an onject</p>
