Search code examples
wordpressinternet-explorerinternet-explorer-9quirks-mode

some page in my website didn't load doctype, so it display in quirks mode, can anyone help me?


here is my website: http://kidscare.edu.vn

When open it in IE9, the homepage switch to quirks mode and it display ugly

but when open another page, it will display fine http://kidscare.edu.vn/babiescare

I use F12 tool to inspect, and I saw the doctype was not load in the header

Can anyone help me to solve it?


Solution

  • Don't use F12 tool (Firebug or IE's equivalent) to see if the doctype is loaded. These tools DO NOT show you the source, they show you how they inerpret the source.

    To actually view the source, right click the screen and choose "View source".

    The reason this displays in quirksmode I believe is because you are using the transitional doctype.

    So try using the strict doctype instead:

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">