You are here: CSS Question « HTML « IT news, forums, messages
CSS Question

Posted by City Dweller on 11/27/36 11:56

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

 

Navigation:

[Reply to this 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

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