HTML5 doctype putting IE9 into quirks mode?
Placing:
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
in the <head>
tag should do it.
IE9 throwing site to Quirks mode
If the page is local, or on an Intranet , Internet Explorer defaults to quirks mode.
If you put the same page on The Web, it would behave as expected.
To get it working as you want, as you are using ASP.NET, you can add this to your web.config file:
<system.webServer>
<httpProtocol>
<customHeaders>
<clear />
<add name="X-UA-Compatible" value="IE=edge" />
</customHeaders>
</httpProtocol>
This avoids having to override the user settings for all Intranet pages.
IE and HTML5 doctype issues
IE does not go into quirks mode with that doctype. The boilerplate should be fixing IE problems, not causing them. You are missing the <html>
element after the doctype. Add that to see if things change. HTML5 does not require it but, if missing, either IE or boilerplate may go crazy according to the docs.
Also, just remove the comments after the doctype and that should make the problem go away.
Why is the site running in IE quirks mode?
It's a Byte Order Mark, , which is invisible to most text editors. Try using VIM and killing it or somehow find a different text editor and kill everything before <!DOCTYPE html>
You can simply copy <!DOCTYPE HTML>
and everything below it into a new file and save over it, meaning you wont be copying the BOM coming before it to resolve this issue; I've ran into it many times.
Related Topics
CSS - Relative Positioned Parent Div Not Stretching to Absolute Child Div Height
Margin:Auto;' Doesn't Work on Inline-Block Elements
Remove Background Arrow from Date Input in Google Chrome V20
Gmail Blocking Small Embedded Inline Images in Email Template
Html:How to Show Images in a Textarea
Is the HTML Shown via 'View Source' Different from the HTML Shown in (Firebug) Developer Tools
Is There a Max Size to the Length of a Hidden Input in HTML
How to Hide Table Row Overflow
Is There Any Benefit to Adding Accept-Charset="Utf-8" to HTML Forms, If the Page Is Already in Utf-8
CSS Select Elements with Partial Id
How to Hide Drop Down Arrow in IE8 & IE9
Is It Ok to Use Unknown HTML Tags
Align the Form to the Center in Bootstrap 4
Fit Website Background Image to Screen Size