Html – Ie 6, 7 and 8(Compatibility mode) issues

browsercross-browserhtml

We have a site that works fine with any latest browser including ie8.

But it has lots of issues with ie6, ie7 and ie8(Compatibility mode).

We are using following doctype

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

So it is not using quirck mode.

Before i start digging into individual issues, just want to known if i am missing something or doing something wrong to go ie in some different mode other than standard?

I tried to find list of known issues with ie6 and ie7 when using w3c standards but didn't find much useful, but found just enough to confuse me.

Any known site where i can find known issues with old ie's when using w3c standards?

Best Answer

By specifying what type of HTML document you are using at the top of your document you are taking the browser out of quirks mode. Now, the newer browsers are much more standards compliant and therefore easier to code with. Here are some tips that might help you out:

  • Use DIV instead of TABLE for layout
  • Watch out for Document Object Model or DOM differences between browsers
  • Here is a site with CSS compatibility info: http://www.quirksmode.org/css/contents.html
  • Run your code through W3C's Validator
  • Instead of W3C's free validator, consider purchasing a HTML validator which you can run on your machine. In my opinion a programmer wouldn't run a C# program without compiling, and web development shouldn't be done without some sort of validation program. It will save you oodles of time.

Sorry I can't post more links. Stack overflow will only allow me to post one.