Andy Dingley wrote:
Blue Apricot wrote:
How can I prevent certain Class properties from cascading from a parent
table to its children?
Start by posting a URL so that we can see what you're doing.
You can't prevent the cascade. Your options are to either over-rule it
by soemthing even more specific, or (usually better) to stop it
mis-applying itself in the first place by making the selector that
first applies the rule more specific.
Validating your CSS at the W3C site and then studing the tree it
returns is often instructive.
Due to popular demand, here is a URL that shows the effect I want to
avoid:
http://s161149005.onlinehome.us/DEMOS/NESTED/
There are 3 tables here. The main table holds another table in its
Cell F which hold another one-cell table in its Cell N4.
I understand that part of CSS is the "cascade", where certain
properties cascade down. But can I avoid this?
Specifically, I do not want the White Table (class="nested") to
"inherit" the padding, borders, etc. of its "parent" (class="page").
Furthermore, the 3rd table, which has no class defined at all, inherits
the dashed border from its holder (which inherited it from its holder)
and the white background from "nested".
Is there a way to avoid this? A way of over-riding the cascade from a
parent? A way to make a nested table just take on whatever properties
it has by default, as if it was not contained in a another table (from
which it is receiving "cascaded" properties)?
Thanks,
Blue Apricot 416