3

How can I include my IE11 stylesheet on my website ?

I have the following comment in my html but it does not work for IE11. Or maybe I understood it wrongly?

    <!-- HTML5 shiv and Respond.js support IE8 or Older for HTML5 elements 
    and media queries -->
    <!--[if lt IE 9]>
   <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js">
   <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js">
   </script>
   <script src="bower_components/html5shiv/dist/html5shiv.js"></script>
   <script src="bower_components/html5shiv/dist/html5shiv-printshiv.js">
   <![endif]-->
Liam
  • 27,717
  • 28
  • 128
  • 190
A.S
  • 35
  • 2
  • 7
  • 2
    These are called conditional comments. [They are no longer supported by IE or any other browser](https://msdn.microsoft.com/en-us/library/ms537512(v=vs.85).aspx).You now need to use feature detection, browser detection is and always has been a broken methodology – Liam Sep 13 '17 at 08:06
  • Possible duplicate of [IF IE conditionals not working](https://stackoverflow.com/questions/19502040/if-ie-conditionals-not-working) – Liam Sep 13 '17 at 08:07
  • ah ok thats why it does not work. How can I use detections? – A.S Sep 13 '17 at 08:09
  • [Implementing feature detection](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Feature_detection) – Liam Sep 13 '17 at 08:09

0 Answers0