I want to use some conditional style for IE 9, but I want to have conditions inside my main stylesheet - do not use the second stylesheet or refer to it on an HTML page. At the moment, I put this code in an HTML page that works because it overwrites other styles in the main stylesheet:
<!--[if IE 9]> <style> nav li a:hover { text-decoration: underline; color: black; } nav .four a:hover{ color:white; } </style> <![endif]-->
But I would like to have these conditions in a CSS sheet, so that all this is in one place, and I do not need to repeat the code on each page. I would prefer not to use separate CSS only for IE 9 - I already have one for IE 7-8. I tried this in the stylesheet:
<!--[if IE 9]> nav li a:hover { text-decoration: underline; color: black; } nav .four a:hover{ color:white; } <![endif]-->
The above code is specific to my nav bar for IE 9 (its fix for nav bar because IE 9 does not support text shadows).
Is there a way to do this in the CSS stylesheet?
source share