Is there a tag that makes internet explorer work like other browsers?

Asked

Viewed 170 times

0

Are there any tags that make internet explorer work like other browsers? Like the display grid and other things.

  • 1

    That does magic, basically, no. The support for these technologies depends exclusively on the browser development team, if they do not implement, there is nothing to do. Nor is it a generic solution to all problems, each requiring a solution. CSS Grid has partial IE11 support prefixed -ms-. If that’s not enough, you’ll probably need another CSS like fallback to prevent the layout stay broken.

1 answer

4


A specific tag doesn’t exist as far as I know. But there are ways for you to get around it.

An example is the use of the tag @supports, with it vc can make a fallback if the browser does not support the Grid. as in the Example below. Link to the Mozilla documentation

@supports (display: grid) {
  div {
    display: grid;
  }
}
@supports not (display: grid) {
  div {
    float: right;
  }
}

Another way is by using the Modernizr for example https://modernizr.com/ with it vc can create a "pack" of rules that will activate the CSS according to the version of the user’s Browser.

Here’s a basic example

  if (Modernizr.NovaFeature) {
    carregaNovaFeature();
  } else {
    carregaCssAntigo();
  }

Apart from that I would say it would be good practice to include in <head> of that page tag

<meta http-equiv="X-UA-Compatible" content="IE=edge">

She tells older versions of IE that they should behave like Edge. You can read more about this in this question What is the function of the X-UA-Compatible meta tag within HTML

OBS: But none of this guarantees that you will be able to make Grid run in IE versions that do not support Grid for example!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.