title: How do I retrieve an HTML element's actual width and height?
body: <p>Suppose that I have a <code>&lt;div&gt;</code> that I wish to center in the browser's display (viewport). To do so, I need to calculate the width and height of the <code>&lt;div&gt;</code> element. </p>
  
  <p>What should I use? Please include information on browser compatibility.</p>