Re: Proposal: regular expressions (or wildcards) in selectors

Quoth David Woolley on 3/16/2004 3:24 PM...

>>I think the better approach is to require the match of two attribute selectors
>>like so:
>>
>>  *[class^="myclass-a"][class$="5"] {/* ... */}
> 
> 
> That was my thought too.  I think that very few people realise that
> class is a space separated list of class names.
>

Agreed; it's not a very clearly documented feature in most CSS tutorials. 
Perhaps that's for good reason; IE's support for multiple classes is iffy at best.

Actually, speaking of, does anyone know exactly what IE does support with regard 
to multiple classes? I have a web app I'm developing for which I use :hover on 
<tr> elements; this doesn't work in IE, so I do

onmouseover="this.className += ' IEhover'"

to compensate. Sometimes this works, and sometimes it doesn't.

-Felipe Gasper
Urbana, IL

Received on Tuesday, 16 March 2004 16:58:55 UTC