title: clientHeight returns zero
body: <p>I'm creating the DOM elements dynamically using JavaScript. I need to get height of one div to do the slide down animation. But when i use clientHeight its always returning a 0. offsetHeight also do the same. I'm getting the div when i tried console.log(). So its not because the element is not loaded in DOM. Initially i set style display:none for the div to hide it. Is this the reason for the problem? Please someone help me.</p>
  
  <pre><code>document.getElementsByClassName('myDiv')[0].parentNode.children[1].clientHeight;
  </code></pre>
  
  <p>I tried the below code to avoid the problem of display:none. Still clientHeight returns 0.</p>
  
  <pre><code>if(obj.style.display == "none"){ // if it's allready hidden we slide it down
     obj.style.visibility = "hidden";
     obj.style.display = "block";
     height = obj.offsetHeight;
     obj.style.visibility = "visible";
     slideDown(obj,0,height,Math.ceil(height/timeToSlide));
  } 
  </code></pre>