Title: IE Conditional Comments in PHP/CSS?
Last modified: February 7, 2017

---

# IE Conditional Comments in PHP/CSS?

 *  [loden](https://wordpress.org/support/users/loden/)
 * (@loden)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/ie-conditional-comments-in-phpcss/)
 * I’m experimenting with CSS layouts, and I’m having a terrible time getting them
   to work in IE. I’d like to use conditional comments like so:
    `(!--[if expression])
   HTML ([endif]--)` * to specify certain things for IE, but they seem to work only
   in HTML documents. Since all my WP files are either CSS or PHP, I’m at a bit 
   of a loss. I’ve seen these conditional comments used in PHP files (WP blogs, 
   even) before- is there something you have to put in the head tag to get them 
   to work? I know know how much the URL would help, expecially since it’s just 
   a test page I set up to try the stylesheet on, but there it is: [http://www.lodenocity.com/layout-three/index.php](http://www.lodenocity.com/layout-three/index.php)*
   Replace ) and ( with > and <.

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [NuclearMoose](https://wordpress.org/support/users/nuclearmoose/)
 * (@nuclearmoose)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/ie-conditional-comments-in-phpcss/#post-81783)
 * Loden,
    I’ve not a clue about conditional comments. Anything to do with trying
   to get IE to behave itself can be terribly frustrating. Have you checked any 
   IE forums at all? Would be interesting to hear what you discover.
 *  [Root](https://wordpress.org/support/users/root/)
 * (@root)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/ie-conditional-comments-in-phpcss/#post-81785)
 * I have the code in my blog. Help yourself. You will know it when you see it.
 *  [stevarino](https://wordpress.org/support/users/stevarino/)
 * (@stevarino)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/ie-conditional-comments-in-phpcss/#post-81787)
 * LOL Very good Root…
    Loden, you have to keep all these technologies seperate…
   🙂 WP Uses PHP to output HTML. PHP has absolutely no knowledge of HTML (kinda),
   so it won’t influence any HTML you enter.
 *  Thread Starter [loden](https://wordpress.org/support/users/loden/)
 * (@loden)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/ie-conditional-comments-in-phpcss/#post-81848)
 * Turns out most of my problems with the comments were due to my own stupidity.
   That’ll show me not to do stuff like this at two in the morning.
    Just one thing-
   it seems that conditional comments have to consist of tags, they can’t be used
   for attributes within tags. Is this true?
 *  [Root](https://wordpress.org/support/users/root/)
 * (@root)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/ie-conditional-comments-in-phpcss/#post-81859)
 * No.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘IE Conditional Comments in PHP/CSS?’ is closed to new replies.

 * 5 replies
 * 4 participants
 * Last reply from: [Root](https://wordpress.org/support/users/root/)
 * Last activity: [21 years, 10 months ago](https://wordpress.org/support/topic/ie-conditional-comments-in-phpcss/#post-81859)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
