views:

120

answers:

1

I have a page with IE conditional comments in head section, nothing fancy just:

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

As I'm at work ;) didn't have a chance to setup testing page yet, but long story short it works as expected when JavaScript is on. When JS is off IE dosen't seem to read IE7.css though. I wanted to make my site able to run with or without JS, validate and all and wanted to avoid CSS hacks at all costs hence conditional comments.

I couldn't google out anything on the topic and been wondering if anyone has more experience with conditional comments and JS-off. Is there any way at all to get conditional statements work without JS or I'm missing something very silly here?

A: 

I was just about to post the code when I realized that I forgot to update links when copied my html templates into framework I created and so the code I pasted above should actually be:

<!--[if IE 7]>
    <link rel="stylesheet" href="templates/<?php echo Registry::getVariable("theme") ?>/css/findadsIE7.css" type="text/css" />
<![endif]-->

Embarassing mistake and now all works just fine. I was too fast to blame microsoft this time ;)

spirytus