0

Table background color inheritance

In my code (html:27-30, css:150-157) I used a table, but it seems like the background of the <td> elements is inherited by the <tr> elements. Is it possible to give every <td> another background color without changing the <tr>'s background? https://code.sololearn.com/WOFHWpaKq8k2/?ref=app

13th May 2019, 8:32 AM
Roel
Roel - avatar
4 Answers
+ 1
Aprendrox is right td{ background-color:red; }
13th May 2019, 9:15 AM
Gordon
Gordon - avatar
0
But why does it not work when calling the id's / classes that I gave them? or when I put bgcolor="" in the html and what is the difference between background and background-color. I mostly use background 'cause I'm lazy
14th May 2019, 8:06 PM
Roel
Roel - avatar