kj wrote:
Can this be done with CSS?
No.
It might almost be possible using attribute selectors, _IF_ your
problem were only a little simpler and just required an equality test,
not a comparison. However even then you'd be relying on CSS features
of recent spec versions that aren't widely supported. It wouldn't work,
it wouldn't work if CSS was unavailable, it wouldn't work on older
browsers, it wouldn't be at all accessible and most of all it's pretty
contrary to the whole ethos of CSS.
Don't use CSS to mess with content. Use it to present content that you
already have.
I'd suggest some scripting (ideally server-side, but client side would
be OK) that sets a class attribute value of "max-exceeded" onto the
rows >MAX_VAL. CSS could then colour these rows accordingly.
CSS _could_ even change the presentation of the large value into
invisiblilty and a flat text warning message "> MAX", if this class was
set. This would be possible, even quite easy to do, but it wouldn't be
portable (IE is still too broken and too commonplace). Technically
you could do this, practically you shouldn't.