Archive for Web Design Tips

Target IE6 and IE7 with only 1 extra character in your CSS

Tips forIE bug with css. This refers to IE 6 and IE7.

To get around the inadequacies and bugs of IE6 and IE7, I see people going to great lengths and even adding a second stylesheet with conditional comments when we all preach at the same time to minimize HTTP requests.

Complicated hacks and workarounds all take more time. And time is money in the business world (especially to support a dying user base).

color: #999; /* shows in all browsers */
*color: #999; /* notice the * before the property - shows in IE7 and below */
_color: #999; /* notice the _ before the property - shows in IE6 and below */

#myclass refers to the actual class of your element name or title.

The * reflects to IE7 bug and the _ reflects to IE6 bug

And there you have it. That’s all you have to do. No more wasting your time with the second style sheet to make IE work with your edits or class elements.