View Full Version : Conditional Comments

06-17-2009, 02:08 PM
Good afternoon!

I'm having a little trouble using a conditional comment. I've added the following line of code to my HTML file, within in the <head> tags.

<!--[if IE 7]><link rel="stylesheet" type="text/css" href="ie-fix.css" /><![endif]-->

The CSS file named ie-fix.css is uploaded on my server within a CSS folder. I've never really had problems with this before, but any changes I make are not been recognized. I've done carried out basic fixes like clean the cache, but still no luck. Any of you folks have any ideas?

Thank you for your time.

06-17-2009, 02:12 PM
href="ie-fix.css" links to a file in the same folder as the page. You probably want something like /CSS/ie-fix.css (if the file is in a folder named "CSS")

06-17-2009, 02:40 PM
Thank you for the quick reply, I've just added that directory to the code, it now looks like:

<!--[if IE 7]>
<rel="stylesheet" type="text/css" <link href="CSS/ie-fix.css" />

It's still deciding not to recognize the CSS though, any more ideas? :wink:

06-17-2009, 03:40 PM
Is CSS the name of the folder the ie-fix.css file is in? Is the page in the same folder as the CSS (or whatever it's called) folder is in? Can you post a link?

06-17-2009, 03:51 PM
Ie-fix.css is sat in a folder called CSS, along with various other CSS files. The HTML page isn't located in this folder though, all of my HTML files are basically uploaded to my hosting accounts main directory whilst images and CSS files have their own folder.

06-17-2009, 08:50 PM
to repeat, can you post a link?