Hiding/Showing content for Internet Explorer

Hi there! With Pro 2.2.5 I have made an Header with an Headline V2. In Internet Explorer the text does not go to a new line, while in Chrome, Firefox, and Edge it is OK. Is there an option to hide/show an element if the browser is IE?

Thank you!
Pietro

Hi There,

Thanks for writing in!
Unfortunately, that is not possible in the theme setting. You need custom coding for that.
You can hide show any section through browser specific CSS. Here is a reference to that.

Please add a custom class name to any section or element in customize section.

After that, you can target this class with the browser specific CSS mentioned in the article above.
The CSS can be written in Theme Option -> CSS.

Hope this helps!

Thank you for the hint. I dive into it!
(Request can be closed).

You’re welcome.

Maybe it can be interesting to somebody else. How to hide elements in internet explorer, and maybe other browsers.

Step 1
Give to the element you want to hide with IE the following object ID “chrome”.
Give to the element you want to show only with IE the following ID “ie”.

Step 2
Add this javascript to the page:

if (navigator.appName == ‘Microsoft Internet Explorer’ || !!(navigator.userAgent.match(/Trident/) || navigator.userAgent.match(/rv:11/)) || (typeof $.browser !== “undefined” && $.browser.msie == 1))
{
document.getElementById(“chrome”).style.display = “none”;
document.getElementById(“ie”).style.display = “block”;
}

Step 3
Add this CSS to your page:

.ie { display: none; }
.chrome { display: block; }

Thanks for sharing @hdapi.

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