On Jul 3, 2010, at 10:57 PM, Rick Pasotto wrote: > I just ran google's speed test on one of my pages and it reports many > "inefficient" rules. They are all of the form: > > div#footer p > > Is google telling me that the 'div' part is not necessary and that it > slows processing?
yes, that is about it. You'd only ever need the 'div' part to increase specificity. In this case, the parser has to look for (all occurrences of) #footer and of 'div' and then matching them. If you make it '#footer p', the only lookup is for #footer. Note, we're talking about milliseconds here, on simple pages you won't see / feel any difference. On large, complex pages (think Gmail), it could be a wee bit more significant. Plus, those 3 characters add page-weight to your stylesheet. Think of the trees. Philippe --- Philippe Wittenbergh http://l-c-n.com/ ______________________________________________________________________ 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/