Reputation: 61
IE9 is forcing Quirks mode and I have tried out a few solutions to no success
I have tried adding : <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
However this doesn't seem to fix the issue - even if it is placed directly underneath <head>
Here is the top of my code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<!--[if lt IE 7 ]> <html class="ie ie6 no-js" lang="en"> <![endif]-->
<!--[if IE 7 ]> <html class="ie ie7 no-js" lang="en"> <![endif]-->
<!--[if IE 8 ]> <html class="ie ie8 no-js" lang="en"> <![endif]-->
<!--[if IE 9 ]> <html class="ie ie9 no-js" lang="en"> <![endif]-->
<!--[if gt IE 9]><!-->
<html class="no-js" lang="en">
<!--<![endif]-->
<!-- the "no-js" class is for Modernizr. -->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title>Availability</title>
<link href="<%= CommonHelper.GetApplicationLocation() %>portal.css" type="text/css"
rel="stylesheet" />
<LINK href="<%= CommonHelper.GetApplicationLocation() %>National.css" type="text/css" rel="stylesheet" />
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-10">
<link rel="shortcut icon" href="<%= CommonHelper.GetApplicationLocation() %>favicon.ico" />
<LINK href="<%= CommonHelper.GetApplicationLocation() %>css/new-styles.css" type="text/css" rel="stylesheet">
<LINK href="<%= CommonHelper.GetApplicationLocation() %>mobile.css" type="text/css" rel="stylesheet">
<meta charset="utf-8" />
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR" />
<meta content="C#" name="CODE_LANGUAGE" />
<meta content="JavaScript" name="vs_defaultClientScript" />
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<meta name = "format-detection" content = "telephone=no" />
<meta name="google-site-verification" content="quYroxU0ZWi8YjEB9xL8j79VCAhHrSalFUnPFexYjxI" />
Am I missing something here?
Thanks
Upvotes: 2
Views: 390
Reputation: 19609
Use the simple <!doctype html>
declaration at the top of your HTML file. This is for HTML5, and it is most probably what you're looking for.
Upvotes: 1
Reputation: 3612
You need to specify the url in the doc type see here: http://msdn.microsoft.com/en-gb/library/ie/ms535242(v=vs.85).aspx for a table of when standards mode is triggered or not.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" http://www.w3.org/TR/html4/loose.dtd">
As commented, you may as well just use the html5 doctype. It's very succinct:
<!DOCTYPE html>
Upvotes: 1