So I have a media query in my code that checks for device width. It works fine, just not in IE8 or lower obviously, as media queries are not supported.
I am therefore trying to throw IE8 a stylesheet (I figured I go with the one that is built for lower resolutions) but it seems that my media query (whether before or after the IE8 comment) stops IE8 from linking to any stylesheet at all.
Please could somebody inform me of a workaround? And is there a way to check for device width within the IE8 comment?
Here is my code;
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" media="screen
and (min-device-width:600px) and (max-device-width:1024px)" href="oldScreen.css">
<link type="text/css" rel="stylesheet"
media="screen and (min-device-width:1025px)" href="home.css">
<!--[if lt IE 9]>
<link type="text/css" rel="stylesheet" href="oldScreen.css">
<![endif]-->