2

now I know, that <!--[if !IE]><!-->...<!--<![endif]--> doesn´t work for IE 10+.

So there is one option, to use:

@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
    // IE10+ CSS here
}

but I need something like this:

@media all and not(-ms-high-contrast: none), not(-ms-high-contrast: active) {
    // every browser EXCEPT IE10+ CSS here
} 

It is possible?

Thx.

Jakub Kameniar
  • 179
  • 1
  • 1
  • 8
  • Does any of the answers to [Detecting IE11 using CSS Capability/Feature Detection](https://stackoverflow.com/q/18907131/1016716) help? (Or, any of the questions in its Linked list.) – Mr Lister Jan 22 '18 at 07:31
  • @MrLister sadly no, I am trying to avoid javascript. But that is not the main problem, only way in thread that souhld work for me is tagged solution, but it has on big problem - in doesn´t recognize if it is Edge or IE, for that solution it is same browser. – Jakub Kameniar Jan 22 '18 at 07:42
  • 1
    The accepted answer uses JavaScript, yes, but there are many other answers to that question, including newer ones. I mean, [this one](https://stackoverflow.com/a/45494070/1016716) looks nice. `@supports not (old: ie) { /* code for not old IE here */ }` is just what you want. See also [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/%40supports#Examples). – Mr Lister Jan 22 '18 at 07:47
  • Did not notice that answer, that is brilliant and works for me, thank you. – Jakub Kameniar Jan 22 '18 at 07:58

1 Answers1

0

Thanks @MrLister I have solution to my problem.

pack your css to this and it will work.

@supports not ((-ms-high-contrast: none) or (-ms-high-contrast: active)) {...}
Jakub Kameniar
  • 179
  • 1
  • 1
  • 8