How to disable Quirk Mode?

33.7k views Asked by At

I have search over stack overflow regarind ie8 rendering on quirks mode. I tried to disable it by the following code. But when I use ie with F12 to test.

Ie 10 --> document quirks ie 7, 8, 9 --> ie 5 quirks mode.

How can I turn it off such that it only render in standard mode. As I use margin 0 auto to align most of my stuff.

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>   

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


    <head  xmlns="http://www.w3.org/1999/xhtml">
      <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    </head>
2

There are 2 answers

2
elle On

I had this problem on Amazon where the music samples wouldn't appear or wouldn't work. Here's what the Amazon rep sent me and it worked:

To fix this, turn off Quirks Mode:

  1. Press "F12" on your computer's keyboard. This opens a settings panel in the lower third of your browser window.
  2. Select the "Document Mode" tab at the top of this panel. If you're currently in Quirks Mode, the tab will likely read, "Document Mode: Quirks."
  3. In the menu that opens, select the "Standards" option that corresponds with your version of Internet Explorer. For example, if you have Internet Explorer 9, select "Internet Explorer 9 standards."
  4. The "Document Mode" tab will change to reflect your selection. Once you've confirmed you're no longer in "Quirks Mode," click "X" to close the settings panel.
0
MoritzGiessmann On

IE renders your page in quirksmode because you have text above your doctype. Try moving it to another part of the page. If that isn't an option you can force standards mode with custom headers: http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" ... Putting this in .htaccess?