Is there a way for the class applied to the TR element of a table to override the styling applied to the TD?
td {
border: 1px dotted #d6d6d6;
}
.tr {
border-bottom: 1px solid #ff0000 important;
}
In the above CSS code, what should I do so that the .tr class (applied to certain TR elements) overrides the td styling?
2
Answers
Here’s the corrected CSS code to override the styling applied to the
td
:Actually,
border-bottom
is more specific thanborder
property. So, without using a class simply you could usetd
again and it would still work and override.