View Full Version : Standards Mode?
22 Feb 2008, 12:25 PM
From my reading I was under the assumption that the proper DTD statement at the beginning of an HTML document would trigger "standards mode" for browsers (namely IE). Why then is there still a discrepancy between browsers when this statement is included? Is one standard different from another standard? Is it that the defaults are different?
22 Feb 2008, 03:10 PM
Browsers have different default margins, for instance the p tag, h1 to h6 tags and the ul tag amongst others, so browsers interpret the standards differently. Some people state all margins and padding as 0 to begin with which will make all browsers the same, then add margins and padding as necessary.
However, a doctype does cure the worst problem where IE without a doctype calculates padding inside a div box dimensions, but outside like Firefox and others when a doctype is included.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.