Results 1 to 2 of 2

Thread: Standards Mode?

  1. #1
    Join Date
    Feb 2008
    Posts
    7

    Standards Mode?

    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?

  2. #2
    Join Date
    Feb 2006
    Location
    Salisbury UK
    Posts
    4,332
    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.
    Code downloaded to my PC will be deleted in due course.
    WIN7; IE9, Firefox, Opera, Chrome and Safari for Windows; screen resolution usually 1366*768.
    Also IE6 on W98 with 800*600 and IE8 on Vista 1440*900.

Similar Threads

  1. Web Standards Pod Cast
    By chris@castus in forum The Lounge
    Replies: 0
    Last Post: 19 Oct 2006, 03:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •