title: Getting the z-index of a DIV in JavaScript?
body: <p>I have a div <code>normaldiv1</code> with class <code>normaldiv</code>.
  I am trying to access its z-index through the style property but it always returns 0 although it's set to 2 in the stylesheet.</p>
  
  <p>CSS:</p>
  
  <pre><code>.normaldiv
  {
      width:120px; 
      height:50px; 
      background-color:Green;  
      position: absolute;
      left: 25px;
      top:20px;
      display:block;
      z-index:2;
  }
  </code></pre>
  
  <p>`</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div id="normaldiv1" 
       class="normaldiv" 
       newtag="new" 
       tagtype="normaldiv1" 
       onmousedown="DivMouseDown(this.id);" 
       ondblclick="EditCollabobaTag(this.id,1);" 
       onclick="GetCollabobaTagMenu(this.id);" 
       onblur="RemoveCollabobaTagMenu(this.id);"&gt;
  </code></pre>
  
  <p>JavaScript:</p>
  
  <pre><code>alert(document.getElementById('normaldiv1').style.zIndex);
  </code></pre>
  
  <p>How can I find the z-index of an element using JavaScript?</p>