# Conditional comment for IE not working

**URL:** <https://forum.kirupa.com/t/conditional-comment-for-ie-not-working/264581>\
**Category:** web dev\
**Created:** [June 27, 2008, 1:55pm UTC](https://forum.kirupa.com/t/conditional-comment-for-ie-not-working/264581 "2008-06-27T13:55:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![irishcash33](https://avatars.discourse-cdn.com/v4/letter/i/958977/32.png) [@irishcash33](https://forum.kirupa.com/u/irishcash33)\
**Post date:** [June 27, 2008, 1:55pm UTC](https://forum.kirupa.com/t/conditional-comment-for-ie-not-working/264581/1 "2008-06-27T13:55:23Z")

</div>

Hey guys, I have 2 style sheets. Main one, and one for IE. I put in this conditional comment in the head section It is not working. Any suggestions? you can view the site at [www.wallstclothing.com](http://www.wallstclothing.com) Thanks

---

<div class="post-metadata">

**Author:** ![redelite](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@redelite](https://forum.kirupa.com/u/redelite)\
**Post date:** [June 27, 2008, 2:00pm UTC](https://forum.kirupa.com/t/conditional-comment-for-ie-not-working/264581/2 "2008-06-27T14:00:26Z")

</div>

Are you sure the file is there? (css/wallstIE.css)

---

<div class="post-metadata">

**Author:** ![irishcash33](https://avatars.discourse-cdn.com/v4/letter/i/958977/32.png) [@irishcash33](https://forum.kirupa.com/u/irishcash33)\
**Post date:** [June 27, 2008, 2:10pm UTC](https://forum.kirupa.com/t/conditional-comment-for-ie-not-working/264581/3 "2008-06-27T14:10:49Z")

</div>

yes its there!!

---

<div class="post-metadata">

**Author:** ![actionAction](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/actionaction/32/3987_2.png) [@actionAction](https://forum.kirupa.com/u/actionAction)\
**Post date:** [June 30, 2008, 5:31am UTC](https://forum.kirupa.com/t/conditional-comment-for-ie-not-working/264581/4 "2008-06-30T05:31:13Z")

</div>

Try replacing your code with this to test. It’s probably that your CSS is malformed for IE:

```auto

<!--[if IE]>
<script type="text/javascript">alert("This IE MoFo");</script>
<![endif]-->

```

---

<div class="post-metadata">

**Author:** ![irishcash33](https://avatars.discourse-cdn.com/v4/letter/i/958977/32.png) [@irishcash33](https://forum.kirupa.com/u/irishcash33)\
**Post date:** [June 30, 2008, 12:45pm UTC](https://forum.kirupa.com/t/conditional-comment-for-ie-not-working/264581/5 "2008-06-30T12:45:42Z")

</div>

Thanks AA. That code worked. The alert came up in IE. Now what? do I put the link to css in place of the alert?

Thanks

---

<div class="post-metadata">

**Author:** ![actionAction](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/actionaction/32/3987_2.png) [@actionAction](https://forum.kirupa.com/u/actionAction)\
**Post date:** [June 30, 2008, 5:41pm UTC](https://forum.kirupa.com/t/conditional-comment-for-ie-not-working/264581/6 "2008-06-30T17:41:01Z")

</div>

No problem, that just means that your conditional tags are working, and your css is not. I would suggest you hard embed both stylesheets and try and troubleshoot your problems like that.

---

<div class="post-metadata">

**Author:** ![irishcash33](https://avatars.discourse-cdn.com/v4/letter/i/958977/32.png) [@irishcash33](https://forum.kirupa.com/u/irishcash33)\
**Post date:** [June 30, 2008, 6:03pm UTC](https://forum.kirupa.com/t/conditional-comment-for-ie-not-working/264581/7 "2008-06-30T18:03:44Z")

</div>

Thanks, I will try this.

---

<div class="post-metadata">

**Author:** ![irishcash33](https://avatars.discourse-cdn.com/v4/letter/i/958977/32.png) [@irishcash33](https://forum.kirupa.com/u/irishcash33)\
**Post date:** [July 1, 2008, 2:33pm UTC](https://forum.kirupa.com/t/conditional-comment-for-ie-not-working/264581/8 "2008-07-01T14:33:44Z")

</div>

Ok so I got the comments to work. By putting in the individual fixes rather than linking to a new css, works. It was working great until now. It is not reading one fix, and I can not figure out why. I have looked at everything, and can’t see what is stopping it.  
The div won’t move in IE. You will see what I mean.  
[Site](http://www.clashgraphicdesign.com/uk-site/index.html)  
Thanks
