Hi,
Can someone confirm whether it's possible to set the background-color
property in CSS for a table row (<tr>)?
My code is:
table { display: table; table-layout: fixed; }
tr { display: table-row; }
td, th { display: table-cell; }
and...
table { text-align: left; border: 1px solid silver; font-size: 1em;
width: 100%; margin: 2px; }
td { padding: 0.3em; }
tr { border: 1px solid silver; }
tr.darker { background-color: #cccccc; }
tr.lighter { background-color: #f7f7f7; }
th { padding: 0.3em; }
Many thanks,
Matt :)