title: IE lies about borderWidth?! How to get actual value?
body: <p>By default, many of you know, IE has a 2px border around the body tag. IE considers this border as outside of the regular page. Basically, this means that the document origin is actually at [borderLeftWidth, borderTopWidth].</p>
  
  <p>This poses problems when doing calculations in JavaScript that require both clientXY and screenXY. Since there is a border in between the two values, you have to compensate by adding in the borderWidth. By default this border is 2px (unless you modify the page).</p>
  
  <p>However, since the body can have a user-defined border as well (like 7px solid red), you can't just compensate by adding or subtracting 2px. Obviously, you would need to use the actual value <code>document.body.currentStyle['borderTopWidth']</code>. By default, this returns <code>medium</code>. Since the value <code>medium</code> can vary across browser versions, you would need to perform getPixelValue check (I used: <a href="http://blog.stchur.com/2006/09/20/converting-to-pixels-with-javascript/" rel="nofollow">http://blog.stchur.com/2006/09/20/converting-to-pixels-with-javascript/</a>).</p>
  
  <p>When you perform this check, <code>medium</code> returns <code>4px</code>. But that's not right! The body's border is actually <code>2px</code>, even though it says its <code>medium</code>. That made me think, IE might render values differently for the body border. But after manually setting the borderWidth to <code>medium</code>, it corrects itself to 4px. For some reason, IE lies about the body's default borderWidth.</p>
  
  <p>So, my question is: is there any way of getting the real value of the body's border? Or is there a way to check whether the user has set the border already (so it no longer is the default 2px). Performing a user-altered-border check would definitely be my last resort, since IE may decide to remove the default border, thus breaking my scripts.</p>