jeudi 16 juin 2016

using CSS to round off number and show numbers in red or green color


I am getting some numeric value from database. This value is a long decimal value. 0.45345345 or 1.2423432. I want to round-off this value to two decimal places and if the value is negative, I want to show the value in RED color and if the value is positive, I want to show it in green color.

Is it possible to get the desired result with CSS?


Aucun commentaire:

Enregistrer un commentaire