|
Posted by David Woods on 10/24/94 11:56
"City Dweller" <dc_dweller@hotmail.com> wrote in message
news:1156536935.284283.171710@p79g2000cwp.googlegroups.com...
> Hello everyone,
>
> Hope someone can explain this to me....
>
> <style>
> h1#jo { color: red }
> </style>
>
> <h1 id="jo" style="color: yellow">ABC</h1>
>
> All browsers display ABC in yellow. Why? According to CSS specs, the
> specificity of "color: yellow" is 100 since it is a STYLE attribute
> inside a tag. However, the specificity of "color: red" is 101, a = 1
> for #id, b = 0, and c = 1 for h1.
>
> So I would think ABC should be red not yellow. Where is the flaw in my
> calculations?
>
> Thanks.
>
> -- City Dweller
>
Inline style takes precedence over internal style sheet which in turn takes
precedence over external style sheet.
--
David
[Back to original message]
|