title: javascript setAttribute style
body: <p>I don't get how the two following javascript/css codes can produces different result:</p>
  
  <p>1st:</p>
  
  <pre><code>prev.setAttribute('style', 'position:absolute;left:-70px;opacity:0.4;border-radius: 150px;-webkit-border-radius: 150px;-moz-border-radius: 150px;');
  </code></pre>
  
  <p>2nd:</p>
  
  <pre><code>            prev.setAttribute('style', 'opacity:0.4;border-radius: 150px;-webkit-border-radius: 150px;-moz-border-radius: 150px;');
              prev.setAttribute('height', size);
              prev.setAttribute('width', size);
              prev.setAttribute('id', 'thumb'+i);
              prev.setAttribute('position', 'absolute');
              prev.setAttribute('left', '-70px');
  </code></pre>
  
  <p>in the 2nd one, position and left are completely ignored. The result are the same for having the 2 lines of codes and not having them.</p>
  
  <p>It only works if I put <code>prev.style.left</code>, the same thing with position. However setAttribute works for height and width. I really need to know why</p>