I'm trying to determine the style of a div by going by what is in it. If the content is '0', it should have color: red, and if not, fall back to the usual color.
I've found there used to be :contains(value), but that doesn't exist anymore. Is there any replacement I can use for this in css?
Thanks in advance.
innerTextof thediv, if all you're looking for is a single character. You could do that with a small bit of Javascript. But setting the class with server side code is usually the sanest approach.divs that have no content at all: jsfiddle.net/cKnFC.