Re: CSS color conditional on content

Re: CSS color conditional on content

am 23.11.2007 16:20:52 von Harlan Messinger

Summercool wrote:
> for CSS, is it possible to say, if the content in the div or span is
> 0, show the "0" in red, and if it is a "1", show it in green? I can
> use PHP or any script to do it, but it probably is quite handy to let
> CSS handle the formatting style without needing server support.
>
The answer's still "No".

Re: CSS color conditional on content

am 23.11.2007 18:03:57 von the DtTvB

Harlan Messinger wrote:
> Summercool wrote:
>> for CSS, is it possible to say, if the content in the div or span is
>> 0, show the "0" in red, and if it is a "1", show it in green? I can
>> use PHP or any script to do it, but it probably is quite handy to let
>> CSS handle the formatting style without needing server support.
>>
> The answer's still "No".

However, you can use JavaScript to do it.