-1

I need to target IE using Media Queries. example

@media screen and (max-width:1024px) {

 /*Only IE Fix here*/



 /*Any other browser*/
@-moz-document url-prefix() {

      #categoryBackNextButtons{
         width:486px;
      }
}

There is a similar way like there is for firefox?

Pavlo
  • 43,301
  • 14
  • 77
  • 113
Eddwin Paz
  • 37
  • 6
  • Possible duplicate of [How does one target IE7 and IE8 with valid CSS?](http://stackoverflow.com/questions/814219/how-does-one-target-ie7-and-ie8-with-valid-css). Another reference: [IE8 support for CSS Media Query](http://stackoverflow.com/questions/5769493/ie8-support-for-css-media-query). – Aiias Jun 22 '13 at 05:31
  • http://browserhacks.com/ – Pavlo Jun 22 '13 at 06:58

2 Answers2

0

I know it's an old topic, but I've just been searching for the same question and found the answer (while seeing this when searching). If anybody else finds this, here is what worked for me (IE10/11, Firefox 39.0)

IE: @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)

Firefox: @-moz-document url-prefix()

Dracco
  • 423
  • 1
  • 4
  • 15
-1

Please don't resort to user-agent string parsing or browser hacks. See this great article by Paul Irish on conditional comments. You can also see the source code of the HTML5 Boilerplate project.

Simply use the class names in your CSS like so .lt-ie8 div

Adam Simpson
  • 3,591
  • 2
  • 22
  • 27
  • That breaks separation of semantics and styling. I came here searching for another solution because I was trying to avoid that. – Rolf Oct 21 '15 at 14:30
  • @Rolf, it is the least bad solution, no great answer here unfortunately. – Adam Simpson Oct 21 '15 at 18:56