I recently posted some methods for styling SharePoint web parts using attribute selectors. I heard back from several people about how they can’t use this option due to IE6′s lack of support for attribute selectors. I was aware of this at the time of the post but neglected to point it out in the post text.
IE6 usage is steadily dwindling (Jan ’09 – 18.5% browser market share; source: W3). I know there is also internal use of IE6 throughout organizations, but this is also slowly receding.
CSS is usually about form, not necessarily about function. I encourage people to focus on the most common denominator and not the least common denominator when testing and styling web pages for browser support. If attribute selectors or any other type of method works for the mass majority of your users, then use it. Don’t make development harder and more time intensive for the sake of a smaller percentage of users. Having your web pages downgrade gracefully does not mean the web page has to look exactly the same in every browser. You do have to decide what must match visually across all browsers, but ultimately the focus is displaying the content and not what color the text is, etc.
There are a few posted workarounds for attribute selectors and IE6:
Simulating Attributes Selectors in IE6
One last comment before the angry mob hits, I understand that there are situations out there where you have to support IE6. They are the mass majority of users for your site, etc. Attribute selectors aren’t the only solution, just an option. Meanwhile, keep encouraging those sites/projects/people to leave analog and join the digital age before we toss their computer monitors out.