Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to call IE11 specific css [duplicate]

I am facing padding problem in IE11 and i tried to control css using IE specific statements like

<!--[if IE 11]>
<link rel="stylesheet" type="text/css" href="http:kin/frontend/enterprise/wyf-upgrade/css/styles-ie-11.css" media="all" />
<![endif]-->

but this condition not worked properly. kindly please suggest any solution to overcome this issue.

like image 953
Ram Ghonmode Avatar asked Nov 01 '22 07:11

Ram Ghonmode


1 Answers

Try this it works for me

$(window).load(function() {
      if(navigator.userAgent.match(/Trident.*rv:11\./)) {
          $('body').addClass('ie11');
     }

});

body.ie11 #some-other-div{
}

check on fiddle

like image 80
rrugbys Avatar answered Nov 14 '22 06:11

rrugbys