the ie7 tag
Apply CSS to IE7 only
CSS hacks for browsers typically either exploit a flawed implementation or the complete lack of an implementation of a certain feature in the rendering engine. Most webdesigners know about the relatively poor level of web standards support in Internet Explorer and have tried for years to find workarounds for the most grievous bugs. However, exploiting software bugs to create a hack is quite dangerous because software gets updated and old flaws are fixed.
When Microsoft introduced conditional comments with Internet Explorer 5, a lot of problems were fixed. One could use constructs such as
<!--[if IE]>
<style type="text/css" media="screen">
#myID {
background-color: red;
}
</style>
<![endif]-->
to tailor CSS styles to Internet Explorer only. No other browser would parse anything in those conditional comments.
Conditional comments have a lot of drawbacks, though. Most problematically, they require changes to the actual HTML source since there is no equivalent to conditional comments in CSS. They also don’t work well with XSL as Dave Shea has pointed out. This is why most web developers turned to the less reliable technique – the exploitation of browser bugs – to target specific browsers in their stylesheets.