Reply to Re: CSS Question

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация