Thanks Giuliano.
Also keep in mind that each "slot" is base-infinity. So, 11 class
selectors is still less than 1 ID selector.
--Karl
_________________
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Jan 21, 2007, at 2:29 PM, Giuliano Marcangelo wrote:
When it comes to specificity.......the following will give you the
basic rules that are followed by CSS
HTML SELECTOR = 1
CLASS SELECTOR = 10
ID SELECTOR = 100
therefore
div p has a specificity of 2
div p.myclass has a specificty of 12
#myId div p.myclass has a specificity of 112
and in Karls example
#mighty { color: red; } specificity of 100
body div.weak div.enervated p.feeble { color: blue; } specificity
of 1+10+1+10+1+10= 33
hth
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/