• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

My Monkey Do

A Log of Coding Solutions

  • Home
  • Web Hosts
  • Tools
  • About

DOC TYPE or Die

May 24, 2011 by Webhead

All men kill the thing they hate, too, unless, of course, it kills them first.

-James Thurber

After countless hours of trying to figure out why Internet Explorer is doing this or that different from all the other browsers the most common solution is to add a Doc Type.  Never ever forget this.  This one little addition solves 90% 75% 60% of the IE problems.  It can save you hours and hours of googling and hair pulling.  While this is supposed to be in every HTML document, sometimes it’s left out.  Whether it’s the designer‘s fault or the developer’s fault it doesn’t matter.  It should be put in.

This is the doc type that I use.  To me, it is the best one to use because it’s not so strict on the structure and it doesn’t restrict presentational attributes.  This should be the very first thing in the html file, before the <html> tag.

<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN” ” http://www.w3.org/TR/REC-html40/loose.dtd”>

Filed Under: Coding Tagged With: IE crap

Primary Sidebar

Topics

apache apple block editor chrome cms css debug eCommerce embed firebug firefox git gmail goDaddy google hosting htaccess html html 5 IE crap image iPad iPhone javascript jquery linux localization mac os x ms sql mysql open source optimize php php 5.3 responsive rest api seo svg tinymce woocommerce wordpress wpengine xss yii youtube




Categories

  • Coding
  • Off the Shelf
  • Plugins
  • Random Thoughts
  • Server Stuff
  • Tools