As you may or may not be aware IE 7+ (and other browsers) support using CSS 2.1 attribute selectors . Attribute selectors allow you to specify a style on an element whose element matches a particular pattern. For instance: td[x] { font-weight:bold; }
Read More...
Read the complete post at http://blog.devstone.com/aaron/2009/05/04/CSSAttributeSelectorMagic.aspx