title: firefox offsetWidth not reporting anything.
body: <p>I'm trying to do some dynamic resizing using javascript. For part of this I need to report the current size of a container. I wrote a function to do this (below) and it works great in chrome... however in firefox the width does not get reported. I have had a read on the offsetWidth method and in theory it should work in firefox. </p>
  
  <pre><code>function currentBoxW() {
      return document.getElementById("wrapper").offsetWidth;
  }
  </code></pre>
  
  <p>All this reports is "NaN".</p>
  
  <p>There is more in that function in the actual page, but all the additional code has been commented out for testing... this is the actual line that does the reporting. </p>
  
  <p>Have I missed something or is there a smarter way to report width using JS and the DOM? Is there another way to get the width of a div?</p>
  
  <p>Thanks.  </p>