Is there a CSS keyword that I can use to stop an element from inheriting the CSS of its parent element?
Given the example below where one HTML Table nested inside another:
Is there a simple keyword that can be used to force the sub-table to ignore the style of the outer table and use the browser default instead?
My current solution is to create an entirely new CSS class and sub elements to negate the outer style but this seems to be quite clunky so I suspect there is a better way to do it.
Given the example below where one HTML Table nested inside another:
Code:
<style>
.Chart1 {
border:1px solid #666666;
border-bottom:2px solid #666666;
}
.Chart1 TD {
vertical-align:middle;
text-align:center;
}
</style>
<table class="Chart1">
<tr>
<td>
Here is some stuff
</td>
</tr>
<tr>
<td>[red]
<table>
<tr>
<td>
This TD in the nested table will inherit style
from the parent table. How to stop it?
</td>
</tr>
</table>[/red]
</td>
</tr>
</table>
Is there a simple keyword that can be used to force the sub-table to ignore the style of the outer table and use the browser default instead?
My current solution is to create an entirely new CSS class and sub elements to negate the outer style but this seems to be quite clunky so I suspect there is a better way to do it.