views:

1009

answers:

3

Hey,

I am looking for a CSS selector for the following table:

Peter    | male    | 34
Susanne  | female  | 12

Is there any selector to match all TDs containing "male" ?

+2  A: 

If I read the specification correctly, no.

You can match on an element, the name of an attribute in the element, and the value of a named attribute in an element. I don't see anything for matching content within an element, though.

Dean J
+1  A: 

I'm afraid this is not possible, because the content is no attribute nor is it accessible via a pseudo class. The full list of CSS3 selectors can be found in the CSS3 specification.

Edwin V.
That would be the CSS2 spec you're linking to...
peirix
A: 

You'd have to add a custom attribute to the rows called genre with a male of female value and select over that.

voyager