Streaming live at 10am (PST)

Internet Explorer Problems

hi guys,

I have a question, could I make modal pop up base on a used browser?
Our page looks terrible on IE and I would like to say to those visitors that they are using an outdated browser with some hint how and where to update.

Yes, it’s possible using JS, to check for the user agent (that’s info about the user’s browser type) and do something with the result.

Things to do:

  1. design a nice popup in your site. And add a button to close it, if you still want to allow the user to browse your terrible looking website. The button will use IX of course. Make it pass the popup container to display:none. Then write down what the popup container uses for display (is it block or flexbox or grid…), let’s say it’s block. Now pass the element to display:none, that’s its default, it’s hidden for everyone.
  2. find a piece of code that will hide or show an element by targeting its class depending on the user agant. For example here: https://stackoverflow.com/questions/39375159/hide-show-element-if-ie-javascript
  3. edit the code to put your element’s classname inside of it
2 Likes

Hi @Krystof_Kolesa,

Adding to @vincent’s answer, also have a look at this clone-able project which does exactly that:

You can learn from it or integrate as-is :slight_smile:

2 Likes

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.