Code: Conditional Comments

From Chapter 7: CSS Optimization

For example, to remedy the lack of :hover support for list items in Internet Explorer 6, CableOrganizer included the behavior fix only for Internet Explorer 6 with conditional comments, like this:

<!--[if IE 6]><link rel="stylesheet" href="http://css.cableorganizer.com/
ie6home.php" type="text/css" /><style type="text/css">body {behavior:url(http://
css.cableorganizer.com/csshover.htc);}</style><![endif]-->

The Internet Explorer behavior file from Peter Nederlof (the whatever:hover) uses JScript to attach the :hover event to any element (see http://www.xs4all.nl/~peterned/csshover.html).