Quick Tip: How to Target IE6 and IE7 with Only Two Characters


This Cyber Monday Tuts+ courses will be reduced to just $3 (usually $15). Don't miss out.

Did you know that, with the addition of only two characters, you can target both Internet Explorer 6 and 7 in your stylesheets? It's easy...I'll show you!

At a Glance

#someElement {
   background: red; /* modern browsers */
   *background: green; /* IE 7 and below */
   _background: yellow; /* IE6 exclusively */