I think I found a bug in WebKit (or jQuery), can others confirm?

It's not a bug in finding the outer width. Webkit actually renders the divs as having large right margins. Since the right margin extends (almost) to the right edge, you get the larger outer width.

I'm not sure if this is the "correct" way to render it, but if there's a specification that says that the right margin shouldn't extend out, then this would be a bug in WebKit.


Chrome's DOM inspector confirms that this is a WebKit issue; the div gets a large right margin, even if you try to override margin-right. Some things that force the margin to be calculated correctly include float: left and display: inline-block. Also if you put the div inside of another sized div, its outerWidth(true) will give the innerWidth of the containing div, which could be a useful real-world workaround -- just wrap it in a div with margin: 0; padding: 0; width: XXX.