20

I am using IE 11 version. Is there any other solution to do the following:

Nothing happens when I try to use conditional IE clause in the html webapge. Can anyone help me debug this issue please.

<!--[if IE]>
<a href="next-page.php" class="start-button">CLICK ME</a>
<![endif]-->
Abraham
  • 8,525
  • 5
  • 47
  • 53
Mit Rocks
  • 203
  • 1
  • 2
  • 4

1 Answers1

26

Conditional statements do not work in IE 10 or 11

Support for conditional comments has been removed in Internet Explorer 10 standards and quirks modes for improved interoperability and compliance with HTML5. This means that Conditional Comments are now treated as regular comments, just like in other browsers. This change can impact pages written exclusively for Windows Internet Explorer or pages that use browser sniffing to alter their behavior in Internet Explorer.

If you really need to execute code just on those browsers, and you probably shouldn't, you can use JavaScript to do some feature detection as an alterantive.

Community
  • 1
  • 1
John Conde
  • 217,595
  • 99
  • 455
  • 496
  • 1
    Thanks John! I am working on: http://www.violetrays.in/eyetest Here, I am using transition options for different browsers. There is an issue appearing when it is opened in IE11 while it runs just fine on other browsers. How can I resolve this issue? – Mit Rocks Dec 14 '14 at 15:17
  • 1
    conditional compilation works in ie11; statements work in ie10 – albert Aug 02 '18 at 00:40