Forum Moderators: open

Message Too Old, No Replies

DTD can save you cross-browser problems

the Document Type Declaration can make a big difference

         

tedster

5:03 pm on Oct 2, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Over in our CSS Forum, dillonstars posted about the difference that a full DTD can make [webmasterworld.com] when you're trying to get a layout to work cross-browser. In his case it's CSS, but I've seen many other rendering headaches just vanish when you add the full DTD (which includes the link).

Many WYSIWYG editors add a DTD, but it's often a partial one. This leaves each browser in "quirks" mode and then each one has it's own idea of what that is. With the full DTD, modern browsers go into their "standards" mode. Although there are still cross-browser inconsistencies, they are usually minor compared to quirks, which emulates older browser behaviors.

This issue is really worth your attention if you haven't looked into it.

tedster

4:36 am on Oct 3, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ah, a word of warning as well. If you have pages that work well cross browser in quirks mode, beware of casually changing to a full DTD on a global basis. 90% of your pages may be fine -- but my oh my can some of the others blow up!