I'm trying to include an IE7-only stylesheet using a conditional comment:
<head> <meta charset="utf-8"> <title>Title</title> <meta name="description" content="Description"> <link href="/static/styles/bootstrap.min.css" rel="stylesheet"> <link href="/static/styles/font-awesome.min.css" rel="stylesheet"> <link href="/static/styles/main.css" rel="stylesheet"> <link href='//fonts.googleapis.com/css?family=Quicksand:700' rel='stylesheet' type='text/css'> <!--[if lt IE 9]> <script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <!-- [if IE 7]> <link type="text/css" rel="stylesheet" href="/static/styles/ie7.css"> <![endif]--> <link rel="icon" type="image/png" href="/static/images/layout/favicon.png"> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script> </head> I have a Windows 7 virtual machine (running on VirtualBox) and I'm using the developer's tools in IE9 to switch the browser mode to IE7. Nothing in the referenced stylesheet is applied to the page. I'm loading this stylesheet after all others, I'm using !important on everything, and I've triple-checked the file name and path, but the styles are still not being applied. Can anyone see where I've gone wrong?
<!-- [if IE 7]>, don't remember if the syntax allows that to be there? Possibly not.