Quick Tip: How to Target IE6 and IE7 with Only Two Characters
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 */
}
- Follow us on Twitter, or subscribe to the Nettuts+ RSS Feed for the best web development tutorials on the web.
Note: Want to add some source code? Type <pre><code> before it and </code></pre> after it. Find out more
- http://www.freshclickmedia.com Shane
- http://outthinkgroup.com Tim Grahl
- http://www.duzodesign.com Timothy
- Sean Curtis
- http://www.airwolfe.com Alex Wolfe
- Chris
- NeoNeuro
- Joel
- Jonathan Bennett
- http://www.duzodesign.com Timothy
- Oliver Sumpton
- http://ikeif.net keif
- http://redeyedesigner.com David B
- http://www.ucarmetin.com/ Metin
- http://www.wdonline.com Jeremy McPeak
- http://sffarlenn.net Laneth Sffarlenn
- Brad
- http://www.virtualerik.com Erik
- Marshall
- http://www.alfystudio.com Ahmad Alfy
- Stacy
- http://luckykind.com Danny
- http://luckykind.com Danny
- http://www.wdonline.com Jeremy McPeak
- http://www.tonyvirelli.com Tony V
- http://luckykind.com Danny
- Rich
- http://luckykind.com Danny
- http://adrusi.com adrian
- http://www.libeco.nl libeco
- http://www.whenimnotsleeping.com Bryce
- http://luckykind.com Danny
- Warrick
- Will
- ken
- Hello
- Laurent
- Rich
- http://luckykind.com Danny
- Rich
- http://luckykind.com Danny
- Ant
- Amaury
- vengen
- Webfreak05
- Daniel
- http://stvproductions.net S.T. Verschoof
- Micko
- http://rainworld.com Sean Monteverdi
- http://sffarlenn.net Laneth Sffarlenn
- Mil
- http://www.slicemachine.com Zoran Jambor
- http://www.wexcode.com Adam Wexler
- ziggidy
- http://www.chrismarshall.designerscouch.org Chris
- http://www.donothavedomainyet.com Eugene
- http://sffarlenn.net Laneth Sffarlenn
- Sean Foushee
- Jeremy
- http://www.wdonline.com Jeremy McPeak
- http://www.wdonline.com Jeremy McPeak
- http://www.donothavedomainyet.com Eugene
- http://www.donothavedomainyet.com Eugene
- http://www.monoroot.com Paul
- Eben
- http://www.monoroot.com Paul
- http://www.wdonline.com Jeremy McPeak
- http://wpcoder.com Dan Philibin
- http://twitter.com/maxberndt Max
- Eben
- Miguel Navarro
- Mike T.
- http://sohointeractive.com SohoInteractive
- Kel
- Kel
- Kel
- Kel
- http://sonergonul.com Soner Gönül
- http://maxberndt.tumblr.com/ Max
- ThE_OwNeR
- http://www.crearedesign.co.uk Stephen Webb
- http://www.andrewckor.com Andrew Ckor
- Karan Saini
- http://sffarlenn.net Laneth Sffarlenn
- http://www.celwinfrenzen.com Celwin Frenzen
- http://www.graphicrating.com/ Andy Gongea
- Davinder
- tjedgar
- Marco
- Nick
- http://www.wdonline.com Jeremy McPeak
- Mike
- http://www.jordanwalker.net/index.php Jordan Walker
- http://www.markdijkstra.eu Mark Dijkstra
- teebee
- teebee
- http://www.spreadgun.com tom
- Anna
- http://sffarlenn.net Laneth Sffarlenn
