Conditional comments kunnen je helpen bij het maken van CSS voor enkel één of meerdere versies van Microsoft Internet Explorer. Enkel deze browser kan de code tussen de conditionele comments lezen en dus uitvoeren.
HTML
Voeg volgende code eender waar in je HTML document, enkel de betreffende browser versie zal de code uitvoeren.
<!--[if IE]> This is Internet Explorer <![endif]--> <!--[if IE 5]> this is Internet Explorer 5 <![endif]--> <!--[if IE 5.0]> this is Internet Explorer 5.0 <![endif]--> <!--[if IE 5.5]> this is Internet Explorer 5.5 <![endif]--> <!--[if IE 6]> this is Internet Explorer 6 <![endif]--> <!--[if IE 7]> this is Internet Explorer 7 <![endif]--> <!--[if gte IE 5]> this is Internet Explorer 5 and up <![endif]--> <!--[if lt IE 6]> this is Internet Explorer lower than 6 <![endif]--> <!--[if lte IE 5.5]> this is Internet Explorer lower or equal to 5.5 <![endif]--> <!--[if gt IE 6]> this is Internet Explorer greater than 6 <![endif]-->
gt groter dan
lte minder of gelijk
