I was looking around the internet and couldn't find a solution to give empty cells in html/CSS a different background color.
While working on a system for festival production, I would like to draw attention of the producers (system users) to missing data in complex tables, by giving them an alerting color.
I know the background and the empty cell property of course, but there doesn't seem to be a combination, since the empty cell property only has hide, show and inherent. But I guess there is some solution somewhere...
Any ideas how to solve this?
Use :empty
To see how to change the css background with jQuery, check out this jsfiddle: http://jsfiddle.net/5sVAt/1/
Else, just do the CSS version
td:empty{
    background-color: red;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With