Things You Can't Do In IE6

Attribute Selectors

You can’t use some handy CSS selectors like:

  1. input[type=”text”] for selecting text input elements or
  2. abbr[title] for selecting all <abbr> tags with a title attribute or
  3. a[href$=”.pdf”] for all links that point to pdf files

div#column and div[id=”column”] are equivalent selectors, but one doesn’t work in IE6. Handy for when you want to apply a style for everything else.

24 ways has an article from 2005 that talks about some nifty things you can do with attribute selectors.

4 replies on “Attribute Selectors”

h1:before {content:”Caution!”;color:#ff0000;}

will add “Caution!” before content in h1 style.
(there is also the element :after)

this doesn’t work in IE 6, and i hate this fucking Browser for that!

I love the IE Death March. 😉

Leave a Reply

Your email address will not be published. Required fields are marked *