Jump to content

Cascading Style Sheets/Standards Mode and Quirks Mode

From Wikibooks, open books for an open world

Use the HTML 4.01 Transitional doctype without a URL to force quirks mode on all browsers

Use the HTML 4.01 Strict doctype to force strict on all browser except IE6 and IE7, which use almost standards mode

In the W3C box model, element width excludes padding and borders

In the IE quirks mode box model, element width includes padding and borders, giving extra spacing between containers, but IE6 and later use the W3C box model when in standards compliant mode

Design markup so that fixed width elements that need padding or borders have width set on the container, and borders and padding set on the content element to avoid issues in IE quirks mode with the border box model

References

[edit | edit source]

CSS Differences between Strict and Quirks Mode

Overview of Quirks Mode