title: How do I set the margin of an object in IE?
body: <p>I am trying to set the margin of an object from JavaScript. I am able to do it in Opera &amp; Firefox, but the code doesn't work in Internet Explorer.</p>
  
  <p>Here is the JavaScript I have:</p>
  
  
  
  <pre class="lang-js prettyprint-override"><code>function SetTopMargin (ObjectID, Value)
  {
      document.getElementById(ObjectID).style.marginTop =  Value.toString() + "px";
  }
  </code></pre>
  
  <p>And it is called like this:</p>
  
  <pre class="lang-js prettyprint-override"><code>SetTopMargin("test_div_id", 100);
  </code></pre>
  
  <p>So does anyone know some code that will work in Internet Explorer?</p>