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.
- Previous post: PageRank Explained
- Next post: Maintaining CSS files
Subscribe / follow
Sponsors
Authentic Jobs
- PHP Developer at XYZ.com (Beverly Hills, CA, Ca, US)
- Senior Developer at Magnani Caruso Dutton (Chicago, IL, Il, US)
- Talented Web Designer, WordPress at e9digital (New York, NY, Ne, US)
- Front-End Developer at NEWMEDIA (Denver, Colroado, Co, US)
DreamHost web hosting
Use the promo code 456BEREASTREET3 to save USD 20 when you sign up for DreamHost


Comments
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.