ErieStuff: CSS cascade - Which declaration takes priority?:
Which CSS declaration takes priority when one property is declared multiple times with different values? If equal in priority, what declaration has the highest specificity? And finally, in which order of sources are declaration prioritized if declarations are equal in priority and specificity?

I think the one that caused me the most trouble was, "3. Count the number of attributes, class names and pseudo-classes. The highest score wins!"  If you simply create a class and slap it on a tag, you could have a tag-specific class of rules that easily overrides the class.  The key is specificity.  So in my case, .dayshift wasn't showing up on an li tag until I made a li.dayshift {... class. There were other classes on the li that took precedence over the .dayshift class that wasn't tag-targeted.

Capiche?

Labels: