January 3, 200917 yr like the title says I'm trying to get Internet explorer to recognise a specific style sheet but it's just not having it and I'm running out of hair to pull out, so if some kind soul knows what I'm doing worng or what;s up please let me know.cheers here's the head of the document <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>donewithcrayons</title> <link href="style.css" rel="stylesheet" type="text/css" /> <!-- Import jQuery and SimpleModal source files --> <script src='js/jquery.js' type='text/javascript'></script> <script src='js/jquery.simplemodal.js' type='text/javascript'></script> <!-- Contact Form JS and CSS files --> <script src='js/contact.js' type='text/javascript'></script> </script> <!--[if lt IE 7]> <script type="text/javascript" src="unitpngfix.js"></script> <link href="ieonly.css" rel="stylesheet" type="text/css" /> <![endif]--> <link type='text/css' href='css/contact.css' rel='stylesheet' media='screen' /> </head>
January 3, 200917 yr Which IE version are you testing in? The conditional comment you are using only targets IE6 and below. If you want to target IE7 as well, you'll need to change it to <!--[if lte IE 7]> <script type="text/javascript" src="unitpngfix.js"></script> <link href="ieonly.css" rel="stylesheet" type="text/css" /> <![endif]--> Note the lte meaning less than or equal to.
January 3, 200917 yr If you are using a standalone version of IE6 and IE7 on the same PC it will not recognize conditional comments because the version number in the registry is incorrect. To resolve this have a look at this article: LINK
January 4, 200917 yr like the title says I'm trying to get Internet explorer to recognise a specific style sheet but it's just not having it and I'm running out of hair to pull out, so if some kind soul knows what I'm doing worng or what;s up please let me know.cheers I've had this problem and it turned out that the conflict of styles in the main stylesheet caused IE6 to ignore its stylesheet. Try adding the ! important declaration to your ieonly.css, like this example: #div {width: 100% ! important;} Note the space between the exclamation mark and 'important'.
January 4, 200917 yr Just noticed that you have another link to a stylesheet below the conditional comment. Always place the conditional comments after any other links to style sheets otherwise they will possibly be overridden.
Create an account or sign in to comment