{Carrer web log} ←
CSS Specificity - Cheat Sheet
Tuesday, September 29, 2009 { 11 Comments }
One of most common difficulties with CSS is determining what CSS rule will be applied on the page. That was my nightmare when I started with CSS.But actually is not so hard to understand how these rules are applied and the order of CSS Specificity.
I created CSS Cheat Sheet that I hope it can help you understand CSS Specificity better.

Download:
CSS Specificity - Cheat Sheet(.png)
CSS Specificity - Cheat Sheet(.pdf)
CSS Specificity - Cheat Sheet(.xls)
CSS Specificity - Cheat Sheet(.ods)
There are many articles talking about this issue, here are some:
- Calculating a selector's specificity
- CSS Specificity: Things You Should Know
- CSS: Specificity Wars
- Everything You Need To Know About CSS Selector Specificity
- Link Specificity
- Specificity | HTML Dog
- Understanding Specificity
11 Responses to “CSS Specificity - Cheat Sheet”
-
// Martin Michálek
// 9/29/2009
Hi Vladimir,
thanks for cheatsheet.
I think that your result values format is not right and misleading.
You can better use "1,0,0,0" than "1000" for inline style for example.
"Decimal format" (1000) looks like inline style has the same value as ten id selectors (01000) but it is not true:
http://www.vzhurudolu.cz/test/specificity.html -
// Vladimir
// 9/29/2009
@Martin: You are absolutely right about the format 1,0,0,0. Your example clearly shows the point. But I personally think that the mathematical count is more clear, 1,0,0,0 is more correct but 1000 is more easy to understand. At the beginning I had problems understanding the 1,0,1,0 format it looked like some binary format :)
- // Chris // 9/29/2009
- // Vladimir // 9/29/2009
- // Caleb // 9/29/2009
- // neo // 9/30/2009
- // neo // 9/30/2009
- // Vladimir // 9/30/2009
- // James // 10/04/2009
- // Bjarni Wark // 10/06/2009
- // Lichtathlet | // 10/06/2009
<< Home
About Me <<<
Name: Vladimir Carrer
vladocar [at] gmail.com
Location: Verona, Italy
I'm a web designer, developer, teacher, web addicted, SEO specialist ...
My personal projects <<<
- ALLAPIS.COM
- Hartija - Css Print Framework
- MySQL Lite Administrator
- Formy - CSS Form Framework
- Emastic - CSS Framework
- Malo - CSS Library
- The Golden Grid
- Better Web Readability Project
- Azbuka - CSS Typographical Base Rendering Library
§§Previous Posts <<<
- Blog prototyping with Emastic using the Golden Pro...
- 4 useful Bookmarklet for Twitter, Google, CSS, SEO...
- Twitter Unofficial Redesign
- Integration of Better Web Readability Project with...
- 1 line CSS Grid Framework
- O rule + golden proportion for calculating the gut...
- How we read on web and how can we improve that
- Geo Twitter (#ll)
- Handcrafted CSS + HTML Grid Calendar 2009
- Is it time to move beyond 960? Not yet
Other Profiles <<<

Content is licensed under a Creative Commons Public Domain License



