My site is reading an XML file containing information (values) for a data table. I use CSS to create the table and everything works fine.
To get a better user experience, I wondered if it is possible to dynamically change the background color of each cell depending on its value.
For instance:
Each cell containing a number less than "5" has a red background color;
each cell> = "5" has a green background color.
My first solution on this is to use Javascript, but I want to know if there is a way to solve this only with CSS styles?
Stone source
share