|
Posted by David Woods on 11/20/75 11:56
"City Dweller" <dc_dweller@hotmail.com> wrote in message
news:1156537854.918744.55750@m79g2000cwm.googlegroups.com...
> David,
>
> Thanks for responding.
>
> That is not what CSS specs say, though. Here is quote from
> http://www.w3.org/TR/REC-CSS1:
>
> <<QUOTE>>
> A declaration in the 'STYLE' attribute of an element has the same
> weight as a declaration with an ID-based selector that is specified at
> the end of the style sheet:
>
> <STYLE TYPE="text/css">
> #x97z { color: blue }
> </STYLE>
>
> <P ID=x97z STYLE="color: red">
>
> In the above example, the color of the 'P' element would be red.
> Although the specificity is the same for both declarations, the
> declaration in the 'STYLE' attribute will override the one in the
> 'STYLE' element because of cascading rule number 5.
> <<END OF QUOTE>>
You need to refer to rule #5 specified above the part you quoted.
[quote]
5. Sort by order specified: if two rules have the same weight, the latter
specified wins. Rules in imported style sheets are considered to be before
any rules in the style sheet itself.
[/quote]
x97z is specified in the internal style sheet which is BEFORE the inline
style has been specified. Therefore, the inline style wins.
--
David
Navigation:
[Reply to this message]
|