Calculating CSS 2.1 selector specificity

When an element is matched by the selectors of several CSS rules, the most specific selector wins and the declarations in the corresponding rule are applied. That makes sense, but sometimes figuring out which selector is most specific can be tricky. Fortunately reading Andy Clarke’s CSS: Specificity Wars and Molly E. Holzschlag’s CSS2 and CSS2.1 Specificity Clarified will help you understand how selector specificity works and how to calculate it.

Posted on October 8, 2005 in Quicklinks

Comments

  1. And if your a Star Wars fan, Andy’s article will put a BIG smile on your face. :D

Comments are disabled for this post (read why), but if you have spotted an error or have additional info that you think should be in this post, feel free to contact me.