title: document.body.style.marginTop returning blank string in JS
body: <p>It was my understanding that [some elem].style.maginTop would return a string with the element's top margin.</p>
  
  <p>Instead, I'm always getting a blank string. I want to use this with the body, but I also tried on a div, and that didn't work either.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>console.log(document.body.style.marginTop); // logs ""
  console.log(typeof(document.body.style.marginTop)); // logs "String"
  
  var elem = document.getElementById("testDiv");
  console.log(elem.style.marginTop); // logs ""</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>body {
      margin-top:100px;
  }
  #testDiv {
      margin-top:50px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>hi!
  
  &lt;div id="testDiv"&gt;test&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I'm not sure what I'm doing wrong... Does anybody have a non-jQuery solution to this?</p>