Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to comment out IE conditional comments?

Tags:

comments

html

I'm just wondering if it's possible to comment out IE conditional comments themselves (for testing purposes)? The following does not work:

<!-- <!--[if IE 7]> some code <![endif]--> -->

Thanks in advance! flexx

like image 798
flexx Avatar asked Apr 04 '10 21:04

flexx


2 Answers

No, it isn't possible.

SGML/HTML/XML/XHTML comments cannot be nested.

like image 137
Quentin Avatar answered Sep 29 '22 06:09

Quentin


I think you can just insert something to make them invalid:

<!--\[if IE 7]> some code <!\[endif]-->
like image 30
newtover Avatar answered Sep 29 '22 08:09

newtover