Hi,
In CSS 2 hat sich die Reihenfolge bei !important getauscht:
eigenes Style
Dokumenten-Style
Dokumenten-Style !important
eigenes Style !important
Ergänzung (der Vollständigkeit halber):
- Browser-Vorgabe
- User-Stylesheet
- Nicht-CSS-Angaben (sprich: HTML-Attribute)
- Document-Stylesheet
- Document-Style-Attribute
- Document-Stylesheet !important
- Document-Style-Attribute !important
- User-Stylesheet !important
zu 1) Kapitel 6.4 (http://dokusrv/CSS/CSS2/cascade.html#cascade)
Conforming user agents must apply a default style sheet (or behave as if they did) prior to all other style sheets for a document.
zu 3) Kapitel 6.4.4 (http://dokusrv/CSS/CSS2/cascade.html#q12)
The UA may choose to honor presentational hints from other sources than style sheets, for example the FONT element or the "align" attribute in HTML. If so, the non-CSS presentational hints must be translated to the corresponding CSS rules with specificity equal to zero. The rules are assumed to be at the start of the author style sheet and may be overridden by subsequent style sheet rules.
zu 5) und 7) Kapitel 6.4.3 Errata zu CSS2! (http://www.w3.org/Style/css2-updates/REC-CSS2-19980512-errata.html#s-6-4-3)
count 1 if the selector is a 'style' attribute rather than a selector, 0 otherwise (= a) (In HTML, values of an element's "style" attribute are style sheet rules. These rules have no selectors, so a=1, b=0, c=0, and d=0.)
Da kein Selektor in a eine 1 oder noch höhere Werte erreichen kann, sind style-Attribute NACH dem Document-Stylesheet auszuwerten.
cu,
Andreas
MudGuard? Siehe http://www.mud-guard.de/