Weird behaviour with XSLT and javascript when a DOCTYPE is defined
<p>In my XLST, we use "vanilla" javascript to manipulate some divs that are in our reports. One of them goes above everything else in the center of the screen, and I was calling it like so when the page loads:</p>

<pre><code>var overlayObj = document.getElementById('theoverlay');
overlayObj.style.left = Math.max(0, ((window.innerWidth - overlayObj.offsetWidth) / 2) + window.scrollX);
var padding = 50;
overlayObj.style.top = window.scrollY + padding;
overlayObj.style.bottom = -window.scrollY + padding;
</code></pre>

<p>This is also called when the page is resized + scrolled, and it works fine, however I noticed that there was no doctype in our XSLT and this was causing quirks mode in IE which just about broke everything. So I added the HTML5 doctype and now the code above doesn't do anything. I've put in alerts to fire out the values of <code>overlayObj.style.left</code> and when there is NO doctype in the file I get the exact div sizes back, but when there is a doctype I get the value <code>auto</code>.</p>

<p>Does anyone know why this might be happening? And how to make it give me the values?</p>

<p>When getting the data I was using:</p>

<pre><code>var computedStyle = window.getComputedStyle(overlayObj, null);
alert("left value: " + computedStyle.getPropertyValue("left"));
</code></pre>

<p>If I try to return <code>overlayObj.style.top</code> when there is a doctype, I get no response. Again, without the doctype there is no problems and the value is returned.</p>
