Style order.
Procedure
- Styles can be overridden when using stylesheet files and/or embedded styles.
The rule is:
A style which is defined closes to the text that it affects, overrides the others.
Example
The style order applied to the "hello" text in the example above is:
- The <i></i> tag has no style attribute, so it inherits from its parent (gray)
- style attribute (gray)
- style attribute (blue)
- style block (red)
- linked stylesheet (brown)
- imported stylesheet (orange)
- imported stylesheet (yellow)
- linked stylesheet (green)
Note: The style order applies to Firefox 1.0.7 and IE 6.0.
|