On 9/3/09 7:36 AM, "Climis, Tim" <tcli...@indiana.edu> wrote: > > The spec. Section 6.4.3 "Calculating a selector's specificity" > http://www.w3.org/TR/CSS21/cascade.html#specificity > > There are basically three tallies when figuring out specificity. > > There's basic tags (a). There's tags with classes (a.nav). and there's tags > with id's (a#home). Something with a class is more specific than something > without one, so it wins. Something with an id is more specific than something > with a class, so it wins. > > Also, something with two selectors is more specific than something with one > selector ("div.footer a" is more specific than "a"). > > If two selectors have the same specificity, the one later in the file wins.
This presentation: http://www.slideshare.net/maxdesign/css-cascade-1658158 was really helpful for me to understand specificity. Regards, Divya -- I blog at http://nimbupani.com/blog ______________________________________________________________________ css-discuss [cs...@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/