Test that in all browsers and in IE7+ mode, width is equal to the clientWidth (the inner width).
In IE 6 and older width is equal to the offsetWidth (the outer width).