Search code examples
cssinternet-explorerinternet-explorer-9doctypequirks-mode

Website open in quirksmode by default


I have some problems designing a WP-based website (www.interactiva.cc/~cristall/cristallini) It works fine on all the browser, but not in IE 9 (is it something new ? ;)). I tried to declare the DOCTYPE to avoid the quirksmode with this:

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

However it still erase completely any CSS rule I have used.

What can I do ?

Thank you !


Solution

  • First, change this:

    <!--Theme by StefanoCavaliere.it-->
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
    

    To this:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <!--Theme by StefanoCavaliere.it-->
    

    And note since your webpage is configured to use Chrome in IE (ver 8 at least), use Inspect Element on the Browsers Context Menu and do not use IE's Developer Tools via F12 key.

    Also, your link tags should be self closing. After the DOCTYPE fix, see your errors here with tips on where to fix them at.