I am having trouble with IE stylesheets. I have a few separate style sheets for my website- for ie6, ie7, ie8.
I am using a conditional comment to link my index.php to these stylesheets, and ie is not reading the styles.
This is the code for my condintional comment:

<!--[if IE 8]>
<link href="style-ie8.css" rel="stylesheet" type="text/css" />
<![endif]-->

It's placed in the head of my doc, and the stylesheet is saved correctly, as style-ie8.css
The link to my site is http://www.pickpurple.org/

I would appreciate any help, as I've already googled... I cant come up with why this is happening...
Thanks!

Recommended Answers

All 3 Replies

So, i took a look and noticed that you have a conditional comment for IE10 as well. I assume that you tested the other versions of IE because if you only tested with IE10, you should note that IE10 does not support conditional comments.

Try this page with your IE browsers and see if the conditional comments are detected in the online demo/results section of the page: Conditional Comments for Internet Explorer

JorgeM, thanks for your response. I did not know that IE10 doesnt support conditional comments! Thank you.

No worries...here is a reference article on MSDN in case anyone is interested..

Conditional Comments

Support for conditional comments has been removed in Internet Explorer 10 standards and quirks modes for improved interoperability and compliance with HTML5. This means that Conditional Comments are now treated as regular comments, just like in other browsers. This change can impact pages written exclusively for Windows Internet Explorer or pages that use browser sniffing to alter their behavior in Internet Explorer.

apparently, you'd have to emulate IE9.

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9">

I really dislike IE....argh!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.