title: Why are offsetHeight and offsetWidth intermittently inaccurate?
body: <p>I've been noticing that, at least in Firefox (haven't tested extensively in other browsers yet), the offsetHeight and offsetWidth properties on a <code>&lt;div&gt;</code> might be off by one pixel. (And yes, I'm already accounting for borders, padding, and margin.) Take a look at this screenshot to see what I mean:</p>
  
  <p><img src="https://i.stack.imgur.com/3FEMN.gif" alt="Here the total height with borders is 46px, but as Firebug shows the offsetHeight is only 45px"></p>
  
  <p>So here the total ACTUAL height with borders is 46px, but as Firebug shows the offsetHeight is 47px (and without borders as 45px). Why the discrepancy? Is that a browser glitch? I should mention that the <code>&lt;div&gt;</code> in question has <code>float: left</code> set on it, and it also has some content inside of it that is similarly <code>float</code>ed<code>: left</code>.</p>