Change css when the site opens in ie / edge

1

I made a new page for a site and I'm having trouble viewing this page on ie / edge. (basically it's just the margin-left of an element)

By searching I can not load a specific css if it is identified that the browser is ie / edge.

I tried to use the css hack, but I did not understand how it works.

I have already tested the page in most browsers and it works perfectly, and as always only the problem ie.

    
asked by anonymous 30.04.2018 / 05:08

1 answer

3

I found these posts that might help you:

Now look at some of the possible solutions described in the references. It is important that you look at how these hacks work, where they come from, and how or why to use them, in which situations it would be appropriate to use them.

Example that can be used to correct layout problems in IE10 / 11

@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
   /* IE10+ specific styles go here */

}

Some hacks for IE and Microsoft Edge Windows 10

IE 6

* html .ie6 {property:value;}

IE 7

*+html .ie7 {property:value;}

IE 6 and 7

@media screen {
.ie67 {property:value;}
}

or

.ie67 { *property:value;}

IE 6, 7 and 8

@media 
html>/**/body .ie8 {property:value;}
screen\,screen { .ie678 {property:value;} }

IE 8

@media 
@media screen
_:-ms-lang(x), .ie10 { property:value; }
{ .ie8910 {property:value;} }
screen { .ie8 {property:value;} }

or

@supports (-ms-ime-align:auto) {
  .selector { property:value; } 
}

IE 8, 9 and 10

@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
   /* IE10+ specific styles go here */

}

IE 10

* html .ie6 {property:value;}

Edge

*+html .ie7 {property:value;}
    
30.04.2018 / 11:40