Forum How do I...?

contains selector

ixgal
hi,
I am using the contains selector, in this way:

li:contains("TEXT) {color:red}

This works ok. However, when I add a class to the list, it stops working:

li.the_class_of_li:contains("TEXT) {color:red}

Am I doing something wrong here?
thanks!
mikeday
That should be fine; try this sample document:
<style>
.red { color: red }
.blue { color: blue }
li:contains("One") { text-decoration: underline }
li.red:contains("Two") { text-transform: uppercase }
</style>
<ul>
<li class="red">Red One</li>
<li class="red">Red Two</li>
<li class="blue">Blue One</li>
<li class="blue">Blue Two</li>
</ul>