I'm attempting to create a CSS template for XHTML 1.0 Strict because I am tired of starting from scratch all the time.
Please comment: 1) Tags that are in the wrong category. 2) Tags that are not supported. 3) Tags that are missing. 4) Tags that should be removed. 5) A section that needs to be split up. 6) Sections that need to be combined.
/* Global ==============================================================================*/ html {} body {}
Personally, I'd add an ol li {} and ul li {} just to make it easier to add styles to li's specific to each kind of list. Just because I've never used exactly the same styling for both (usually either custom bullets or disabling bullets and using background images of ul li etc. which you obviously don't want spilling over into ol lis)
in the font group, I'd go with em and strong instead of i and b respectively.
in the global group, I'd add the universal selector: * {}
I handle declarations in their context: menu styles, sidebar styles, footer styles. The reason behind my choice is that, if you make changes to an element of layout and have the stylesheet organized in the way you suggested, you have to look in a dozen different places for the various bits and pieces..
Here's some reading material concerning CSS organization and modularization: http://www.stopdesign.com/log/2005/05/03/css-tip-flags.html http://www.contentwithstyle.co.uk/Articles/12 http://www.digital-web.com/articles/architecting_css/ http://web-graphics.com/mtarchive/001649.php
hope they help. (PS: I thought they will turn into hyperlinks when i post them; sorry for the extra copy-paste work :) )
Dan Burzo, thank you for your reply. em and strong are in the Phrase group because they don't describe font properties, but phrase properties. I can emphasize text by making it bold and make the text strong by making it blocky or with a bigger size. It just happens that they chose italics and bold, but they don't mean the same thing as b and i.
Do you think it's beneficial to have every single element in the template? Myself, I usually start with a pretty basic stylesheet that contains the preset globals I like to work with, and my structural naming conventions. I could see this being useful as a reference, but it seems like an awful lot to look at when starting a site.
As a sidenote, I've never had any experience having to define styles for map and area. And if you're going to go the whole nine, might want to throw in a:hover {}
I agree with dpelletier as far as placing every HTML element under the sun in the style sheet. My global CSS file starts out looking like this (I add elements, IDs and Classes as needed):