title: JavaScript Absolute Positioning Not working in IE7
body: <p>I am try position a div using absolute positioning and it works fine in Safari and Firefox but fails in IE and I can't figure out why. The code is this:</p>
  
  <pre><code>var tempX=123;
  var tempY=456;
  var commentnum=3;
  var bodyelement = document.getElementsByTagName('body')[0];
  var newdiv = document.createElement('div');
  newdiv.setAttribute('id', 'comment_text'+commentnum);
  newdiv.setAttribute('style', 'text-align:center;z-index:10001;left:'+(tempX-23)+'px;top:'+(tempY-80)+'px;position:absolute;');
  newdiv.innerHTML = commenthtml;
  bodyelement.appendChild(newdiv);
  </code></pre>
  
  <p>The script is suppose to generate a div where the user clicks the mouse. But in IE it places the div to the left side and then stacks them on top of each other. Can anyone give me an idea why this is not working?</p>