The Cascading Style Sheets (CSS) specification describes how elements of web pages are displayed by graphical browsers.
Section 4 of the CSS1 specification defines a "formatting model" that gives block-level elements—such as p and blockquote—a width and height, and three levels of boxes surrounding it: padding, borders, and margins.
It adopted a definition width in relation to content, border, margin and padding similar to that for a table cell.
[15] The Internet Explorer box model behavior was often considered a bug, because of the way in which earlier versions of Internet Explorer handle the box model or sizing of elements in a web page, which differs from the standard way recommended by the W3C for the Cascading Style Sheets language.
Internet Explorer versions 6 and onward are not affected by the bug if the page contains certain HTML document type declarations.
[18] For example, quirks mode is triggered: Various workarounds have been devised to force Internet Explorer versions 5 and earlier to display Web pages using the W3C box model.
These workarounds generally exploit unrelated bugs in Internet Explorer's CSS selector processing in order to hide certain rules from the browser.
[18] Box model hacks have proven unreliable because they rely on bugs in browsers' CSS support that may be fixed in later versions.
For this reason, some Web developers have instead recommended either avoiding specifying both width and padding for the same element or using conditional comment and/or CSS filters to work around the box model bug in older versions of Internet Explorer.
[14][20] Web designer Doug Bowman has said that the original Internet Explorer box model represents a better, more logical approach.