View Full Version : Two (or more) background colours in one table row?

02-23-2011, 04:03 AM
I have a table that lists data from a database and my php decides what bg color to make the table depending on the status's of the row. (In this case "Mailed", "Paid", "Partial Paid", "Overdue", "Viewed Online"). Works just fine, however sometimes these may have duplicate status's such as Mailed and Viewed Online. Is there anyway to have the bg color two colours stripped such as a construction bar? (IE Below) Most likley using CSS of course, I'd prefer not to use images if possible. Thanks


02-23-2011, 04:12 AM
You’ll have to use an image as that’s not possible with CSS alone. However, you can just assign a certain class according to the certain state and then apply the respective image using th class selector (and you can reduce a striped image to its minimum repeatable size and make it repeat itself to fill the cell).

02-23-2011, 06:03 AM
Using image and not using the image depends on
you requirement just add span to split and have two colors inside the table