title: How to find height of a HTML element in node.js?
body: <p>I am stuck with quite a tricky issue for a couple of days now. I have a auto-generated HTML page in a variable as string in <code>node.js</code>. I need to find the height of some HTML elements and do HTML manipulations (like tag creation, deletion, append, css attribute setting etc).</p>
  
  <p>Obviously I need to make a DOM like structure of my HTML page first and then proceed.</p>
  
  <p>While for the HTML manipulations I have many options like <code>cheerio</code>, <code>node.io</code>, <code>jsdom</code> etc but none of these allow me to find the height of the element at the node.</p>
  
  <p>So after wasting quite a lot of time on it, I have decided to look for heavier solutions, something like implementing a headless browser (<code>phantomjs</code> etc.) at the node and drive an elements <code>offsetHeight</code> through plain javascript.</p>
  
  <p>Can anyone tell me if it is possible to reach my objective like this? What headless browser will be best suited for this task?</p>
  
  <p>If i am going in the wrong direction, then can anyone suggest me any other working solution? </p>
  
  <p>At this point I am ready to try anything.</p>
  
  <p>Thnx in advance!!</p>
  
  <p>Note: Using <code>javascript</code> at the client side has many problems in my particular case because the contents of the generated HTML page are supposed to be used by the client to paste in his website. Leaving a running <code>javascript</code> that re-structures the HTML will make it difficult at his end.</p>