title: Javascript width of div, returns 0
body: <p>I m trying to retrieve the width of an div for my function with javascript:</p>
  
  <pre><code>#areaDraw {
  margin-top:50px;
  width: 50%;
  min-height: 100%;
  z-index: 1000;
  }
  </code></pre>
  
  <p>and the function:</p>
  
  <pre><code> Event.add(window, "resize", function() {
      sketch.resize(document.getElementById("areaDraw").style.width,   window.innerHeight);
  }).listener();
  </code></pre>
  
  <p>somehow javascript always returns 0 for the width of the div(areaDraw)</p>
  
  <p>so whats wrong with:</p>
  
  <pre><code>document.getElementById("areaDraw").style.width
  </code></pre>