Is there a way to add (background) color to a table cell other than the background-color style attribute? I have tables with programmatically generated textual content and backg
You could use an inset box-shadow to cover your background
box-shadow
background
td { background: red; padding: 1em; } td:hover, .highlight { box-shadow: inset 0 0 0 50px yellow; } td.highlight:hover {/* ? needed ? */ box-shadow: inset 0 0 0 50px green; }
cell to hover cell to hover cell to highlight