title: How do I get the CSS property top from a element in javascript
body: <p>How do I get the CSS property top from a element in javascript.</p>
  
  <p>I have tried <code>document.getElementById(element).offsetTop</code> however this always returns 0. When I have set top: 500px; in the CSS of element.</p>