title: How to get the height in pixels in pure javascript?
body: <p>I have got a forum with the following HTML structure:</p>
  
  <pre><code>&lt;div id="header"&gt;Contents&lt;/div&gt;
  &lt;div id="main"&gt;Contents&lt;/div&gt;
  &lt;div id="footer"&gt;Contents&lt;/div&gt;
  </code></pre>
  
  <p>Basically, I need to set the height of <code>#main</code> to the height of the document minus the height of the other 2 elements. The problem is I have to do it without jquery. I googled the problem and found the clientHeight method, but it returns the height as a number, while I need it as pixels.</p>
  
  <p>So, the question is:</p>
  
  <blockquote>
    <p>Is there any way to get the height in pixels in pure javascript?</p>
  </blockquote>