0

I am developing a responsive site and do use media queries, which are not read by IE8 as well as the internet explorer on windows phone. Therefore I am using conditional comments for these. For IE8 and lower I use the following snippet to include the screen css:

<!--[if lt IE 9]>
...some stylesheets...
<![endif]-->

For windows phone I have to include the css for the mobile resolution and I am using the following snippet:

<!--[if IEMobile]> 
...some stylesheets...
<![endif]--> 

My problem is that the IE 8 seems to use the stylesheets inside the conditional comment for IE mobile as well, because as soon as I am including the styles inside the conditional comment for IE Mobile, the whole site in IE8 and below crashes.

I also tried this combination:

<!--[if (IEMobile)&!(lt IE 9)]> 

But without success. Maybe the idea of the combination is right and I am just making a mistake with the syntax or there is some problem with the IE8 and the rather new conditional comment regarding IE Mobile?

SamiSalami
  • 667
  • 2
  • 10
  • 22
  • For all with this problem: I could not solve it! Just changed everything in a way I did not need css only for windows mobile. – SamiSalami Nov 06 '13 at 15:17

1 Answers1

2

According to this: http://dev.bowdenweb.com/html/ie-conditional-comments.html

You should be able to use this syntax for combining conditions:

<!--[if IEMobile]><![if gt IE 8]> Yo IE 9+ on mobiles <![endif]><![endif]-->
joolss
  • 23
  • 4