| /* | |
| #ie10 will only be red in MSIE 10, | |
| both in high contrast (display setting) and default mode | |
| */ | |
| @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { | |
| #ie10 { color: red; } | |
| } |
Owner
atk
commented
Owner
atk
commented
WARNING: will probably also work in MSIE11 once that comes around the corner.
Owner
atk
commented
Update: This does not work in IE10 on Windows 7
bugpluss
commented
Its work for me.
Thanks for share
Owner
atk
commented
It was an early test version of IE10 on Win7. The final version should work.
reyhappen
commented
It also works on IE11.
crisgrim
commented
gopinathsm
commented
Hi Guys,
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)
In this style does not validate in http://www.css-validator.org/validator. How to validate this style in css.
Please give any solution
Thanks
Owner
atk
commented
Since vendor extensions are part of the standards and are not supported by this validator, the validator is broken, not the style, which is valid in CSS3. Unfortunately, even the W3C's validator doesn't support vendor extensions for media queries.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With the removal of conditional comments in MSIE 10, the requirement for a way to throw CSS code only at this browser version appeared. The newly introduced -ms-high-contrast media query came to the rescue, but it had to work even in high contrast mode. I tested it in IE7-10, Chrome, Firefox, Opera and Safari.