Lets say I have 2 tables. The 2nd one got an id "mytab".
<table>
<tr>
<td>abc</td>
</tr>
</table>
<table id="mytab">
<tr>
<td>xyz</td>
</tr>
</table>
Now I want a CSS for just the 2nd one but for all child-elements too (table has children th, tr, td). What would the CSS-selector look like??
I tired these 2 selectors, but none did the trick.
This would address all tables - not just the 2nd one.
table, th, tr, td
{
border: 1px solid black;
border-collapse: collapse;
}
This would address the correct table but not the children beause they do not have the id set.
table#mytab, th#mytab, tr#mytab, td#mytab
{
border: 1px solid black;
border-collapse: collapse;
}