Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- CSS color conditional on content
November 23, 2007, 8:38 am
rate this thread
- Jukka K. Korpela
November 23, 2007, 9:12 am
Re: CSS color conditional on content
Of course not. Read a primer on CSS to get an idea of what CSS is about,
and you won't ask questions like that.
There's nothing handy about it: it's not possible, and it's not
something that CSS is meant for.
You can use a class attribute to distinguish, say, the elements you
would like to appear in red from those you'd like to be green. However,
you should bear in mind that about 10% of male population are unable to
distinguish red from green well (or at all), so even as auxiliary method
(to highlight a difference that already exists in content, like "0" from
"1"), it's not a good choice.
We heard you the first time, and you crossposted pointlessly, since
c.i.w.a.h. is strictly about HTML, not CSS (and not about server-side
technologies either). Followups trimmed.
Jukka K. Korpela ("Yucca")
- Harlan Messinger
November 23, 2007, 3:20 pm
- » Help out at the first open source hospitality network
- — Next thread in » HTML Authoring Forum