CSS3 In-Depth CSS3 In-Depth

Understanding Specificity

Element selectors carry the least “weight” when it comes to specificity. From there, adding classes or pseudo-classes increase the weight of a selector. IDs carry the most weight in specificity. Estelle walks through her “Speci-FISH-ity” chart describing how these rules relate to specificity. Specificity for the newer selectors like the global selector, combinatory, and negation selector are not as obvious. Remember that specificity is not inheritance.
Get Unlimited Access Now