Tagged: ie11
Hi
I am trying to detecting IE11, so I can add CSS for IE11.
I would like to use this code below.
Will it work and how / where do I put it?
// Can also be used with $(document).ready()
jQuery(window).load(function() {
if(navigator.userAgent.match(/Trident.*rv:11\./)) {
jQuery(‘body’).addClass(‘ie11’);
}
});
CSS:
body.ie11 .your-class {
height: 400px;
width: 100%;
}
Best regards
Claus
Hi Claus,
You can put your jQuery in a function, and your CSS in Quick CSS. How is this related to the theme your are running by the way?
Best regards,
Rikard
Hi
I try handel to a known IE11 bug.
Usually, IE11 will just show an SVG document at the ‘default’ size,
which is 150px high and up to 300px wide.
The SVG image should not be distorted, however, unless it has some animation
– which IE11 also can’t handle.
The simplest fix that I’ve come up with until now, is to detect IE11 and
have a JS assign a body class, like ‘ie11’.
So this is a test to create a solution for an other site. :)
I will try it out and get back to you.
Thanks
Claus