im my website i have a file (ie.css) to correct css problems of the ie. However, now i have a litte problem. Some default styles of the website are good on ie8 and not on ie9.
So, i would like to apply the follow css code inside the file "ie.css" only to the ie version 9, is that possible?
.ngg-galleryoverview {
overflow: hidden;
margin-top: 10px;
width: 100%;
clear:both;
display:block !important;
/*border: 2px solid #ADE132;*/
/*margin-left: 10px;*/
margin-left: 2%;
}
.ngg-gallery-thumbnail {
float: left;
margin-right: 3%;
/*margin-right: 10px;*/
text-align: center;
/*border: 2px solid #ADE132; */
height: 430%;
width: 430%;
}
What you're looking for is conditional comments:
Use IE conditional comments:
The best way to do this is to set a body class only for IE9 and when you want to modify your css it will begin wit that class in front any other html tag or class. This will guarantee that your css is w3c compliant.
Here's the code for that:
Try in css like
:root .classname{ color:pink \0/IE9; } /* IE9 */
OR write in head tag