You are here: Re: Link style over riding another « HTML « IT news, forums, messages
Re: Link style over riding another

Posted by Toby Inkster on 04/25/06 10:09

gil wrote:

> The order of specifying the styles determines which ones will be used.
> The last style specified for an element will be the one used.

That's not entirely true. Specificity is also a key factor. For example:

<style type="text/css">
#green { color: green }
#green2 { color: green }
.red { color: red }
</style>

<p id="green" class="red">
I am green.
</p>

The ID selector is more specific than the class selector, so gets applied
to the paragraph.

More on specificity here:
http://www.w3.org/TR/CSS21/cascade.html#specificity

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

 

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

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