0

Help solve the problem with Edge. You need to apply the style only under the edge, as in my example. I tried to do it as under microsftexplor but without result. How to do it right, where am I mistaken? Thanks!

   .class {
            width: 90%;
            margin-left: 0;
           -ms-margin-left: 10%;
        }
Aleksf
  • 71
  • 5
  • Please inform us which exact version of the MS Edge browser you are using for this test? Whether it is an Edge legacy browser or Edge Chromium browser? – Deepak-MSFT Apr 14 '20 at 07:28

1 Answers1

1

The below code will work for the MS Edge legacy browser from 12 to 18 version.

<!doctype html>
<html>
<head>
<style>
@supports (-ms-ime-align:auto) {
    h1{
        color: red;
    }
}
</style>
</head>
<body>
<h1>This is my sample text...</h1>
</body>
</html>

Output in MS Edge legacy browser:

enter image description here

References:

  1. Browser-specific CSS for Internet Explorer, Firefox, Chrome, Safari and Edge
  2. How to Identify Microsoft Edge browser via CSS?

If you are using the MS Edge Chromium browser then let us know about it. I will try to find a solution to it.

Deepak-MSFT
  • 10,379
  • 1
  • 12
  • 19