|
|
Q5402 What does CSS cascading mean?
irt.org | Knowledge Base | CSS | Q5402 [ previous next ] Q5402 What does CSS cascading mean?There are 3 different types of style sheets:
These 3 different style sheets will overlap in scope, and they then interact according to the cascade, which assigns a weight to each style rule. When several rules apply, the one with the greatest weight takes precedence. Imported style sheets also cascade, and their weight depends on their import order. The cascading order is then the order in which the user agent finds the value for an element/property. User agents use the following algorithm:
The search for the property value is then terminated, when any of the above steps yields a rule, that has a higher weight than the other rules, that apply to the same element/property combination. All in all, apart from the "!important" setting, author style sheets have higher weight than those of the reader. |
-- div -->
|