Copy link to clipboard
Copied
I have a Coldfusion query that is populating an HTML table. I would like to style the negative numbers with a Font color of Red and any non negative numbers with a Font color of Black. Any ideas on how to accomplish this.
Copy link to clipboard
Copied
You could use an if statement that checks if the value is less than 0,
set the font to red, if 0 or greater, set the font to black.
Copy link to clipboard
Copied
I'd do what Debbie suggested Something like:
<span class="#iif(num lt 0,DE("red"),DE("black"))#"> </span>
Then in your stylesheet:
.red { color: red; }
.black { color: black; }