title: Need to find height of hidden div on page (set to display:none)
body: <p>I need to measure the offsetHeight of a div that is inside of a hidden element.</p>
  
  <pre><code>&lt;div id="parent" style="display: none;"&gt;
      &lt;div id="child"&gt;Lorem Ipsum dolor sit amet.&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The parent div <strong>must</strong> be set to "<code>display:none</code>". I have no control over that. I realize that the offsetHeight of the child div is going to be 0. I need to find a workaround.</p>
  
  <p>Something I've toyed with is when the page loads, I copy the childnodes of parent, inject in a div on the page that is set to "<code>visiblity:hidden</code>". Then I measure the height of those elements, and remove the nodes when done. </p>
  
  <p>Any other thoughts?</p>
  
  <p><strong>Update:</strong>
  What I wound up having to do was this:</p>
  
  <p>Using YUI 2, on page load, I found all elements of that given classname that were either set to display:none, or whose height and width was 0 (that's one way of measuring whether an element exists, or a parent is set to display:none). I then set that element to display:block. I then checked it's parent for the same thing and showed the parents until it finds a visible parent. Once highest display:none ancestor is set to display:block, I can measure my element.</p>
  
  <p>Once all elements are measured I reset all of the elements back to display:none.</p>