title: jQuery: height()/width() and "display:none"
body: <p>I always thought elements that had <code>display:none</code> CSS style returned 0 for <code>height()</code> and <code>width()</code>.</p>
  
  <p>But in this example:</p>
  
  <h2>HTML</h2>
  
  <pre><code>&lt;div id="target" style="display:none;"&gt;
  a
  &lt;/div&gt;
  </code></pre>
  
  <h2>CSS</h2>
  
  <pre><code>alert($("#target").height());
  </code></pre>
  
  <p>they don't: <a href="http://jsfiddle.net/Gts6A/2/" rel="noreferrer">http://jsfiddle.net/Gts6A/2/</a></p>
  
  <p>How come? I've seen 0 come back plenty of times in the past. </p>