CSS allows you to group multiple selectors that share the same declaration. This optimization technique allows you to apply the same style to multiple elements to save space. So this: Becomes this: You can combine grouped selectors with contextual and other selectors to create powerful yet compact rules for your style sheets. The body id/class method used to highlight current tabs is one example of this technique. This abbreviated form of specifying style is supported by most modern browsers. You can combine grouping of selectors with grouping of declarations to create even more powerful CSS rules. We'll cover grouping of declarations in an upcoming tweak.div#main {border:1px solid red;}
div#sidebar {border:1px solid red;}
dive#main, div#sidebar {
border:1px solid red;
}
Further Reading
By website optimization on 10 Nov 2003 PM