Loading ...
Sorry, an error occurred while loading the content.

Re: [NH] background

Expand Messages
  • loro
    ... It s browser trickery. When all browsers went for greater standard compliance they had to come up with something so legacy documents wouldn t render as a
    Message 1 of 5 , Oct 31, 2003
    • 0 Attachment
      Neil Felton wrote:
      >I certainly don't understand the pros and cons of URL in the doc type. Be
      >interested to hear some comments.

      It's browser trickery. When all browsers went for greater standard compliance they had to come up with something so legacy documents wouldn't render as a total mess in new browsers. Newer browsers have two rendering modes called Standards (or Strict) and Quirks Mode. When in Quirks Mode they emulate earlier versions of themselves. The first browser that did this used the doctype as a trigger for what mode to use. All the others of course followed suite but not necessarily in the same way. IMO it's all idiotic. Better would have been to invent a meta tag or something for the purpose. Anyway, basically a doctype declaration *with* a URL gives you Standards Mode. You can find a lot about this if you google for "doctype switching". Here are a few...

      Activating the Right Layout Mode Using the Doctype Declaration
      <http://www.hut.fi/u/hsivonen/doctype.html>
      Doctype switching and standards compliance in Internet Explorer and Netscape
      <http://gutfeldt.ch/matthias/articles/doctypeswitch.html>
      Mozilla's DOCTYPE sniffing
      <http://www.mozilla.org/docs/web-developer/quirks/doctypes.html>
      CSS Enhancements in Internet Explorer 6
      <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnie60/html/cssenhancements.asp>
      The Opera 7 DOCTYPE Switches
      <http://www.opera.com/docs/specs/doctype/>

      >It was with the URL that the quirky code didn't work, so I reckon that's
      >probably a good thing. I mean how loose does one want to be? I am just about
      >entirely css now but some of my older pages are not....

      Yes, I think most people that even bother to use a doctype wants standards mode. Something that can be handy to know though is that if you put anything at all before the doctype line IE6 goes into quirks mode. It may be the XML declaration if you write XHTML or simply an ordinary comment. If one encounters on of IE6's nasty display bugs it often helps to put it in quirks mode. This way one can do that while keeping other browsers in Strict Mode. Of course IE then displays other bugs but that doesn't really matter since one has to take care of the old IE5.x bugs anyway. LOL

      Imagine how easy this would be if it wasn't for browsers!


      L.
    • Neil Felton
      ... From: loro To: Sent: Saturday, November 01, 2003 7:13 PM Subject: Re: [NH] background ... Oh well a
      Message 2 of 5 , Nov 1, 2003
      • 0 Attachment
        ----- Original Message -----
        From: "loro" <loro-spam01-@...>
        To: <ntb-html@yahoogroups.com>
        Sent: Saturday, November 01, 2003 7:13 PM
        Subject: Re: [NH] background


        >Loro wrote:
        >
        > It's browser trickery. .....

        Oh well a bit of bed time reading there. Thanks Loro
        Neil
      Your message has been successfully submitted and would be delivered to recipients shortly.