Link to home
Create AccountLog in
Avatar of Ed_CLP
Ed_CLP

asked on

Need conditional format for empty cell in HTML table

I need to format one column in an HTML table so that any empty cells will have a red background.  I can't use any external Javascript libraries to do this.

Thanks!
Avatar of NetExpert-Warszawa
NetExpert-Warszawa
Flag of Poland image

Is the table generated on servers side? Could you give a class to any empty cell?
Is there anything more than a text (span?) inside a cell?
Avatar of Ed_CLP
Ed_CLP

ASKER

The html is server generated (confluence wiki content). I need to highlight only the empty cells or the entire row with the empty cell.
Can you alter the servers code to attach a class to an empty cell?

If not, you can try to play with CSS3 selector :empty. Expect a buggy behavior in some browsers however.
Avatar of Ed_CLP

ASKER

I have some control over the page content. I can add in-line styles to the wiki markup.
ASKER CERTIFIED SOLUTION
Avatar of NetExpert-Warszawa
NetExpert-Warszawa
Flag of Poland image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Ed_CLP

ASKER

This didn't really solve the problem, but was helpful.