I have a Customer table and one of the fields here is for Status….I want to have the background colour of the cell containing this field to be set according to it’s value e.g green for the status “Closed”; yellow for the status “Pending” and so on.
What’s the best way to do this…possibly something that’ll be easy to modify if need be in future?
On your css create class for td as follows, considering you want to display your customer table information in a html table,
Now on your template you can loop your database table on your html table and on the td you can call the css as follows:
Hope that helps