1. Module segmentation, with the following annotations to remind you of the role of CSS code;
/*-------------*/*---------->>> GLOBAL <<<-----------*/*----------*/
A sample Format I try to stick to are this:
Global styles– (body, paragraphs, lists, etc)
Header
Page Structure
Headings
Text Styles
Navigation
Forms
Comments
Extras
2. Unified management of code
For example:
1). title
H2 {}
#snapshot_box H2 {
padding:0 0 6px 0; }
#main_box H2 {
Color: #e2e2e2; }
. sidetagselection H2 {
Color: #fff;
Font:bold 14px/14px "Verdana", Sans-serif; }
You'll be able to style each one independently and isn't worry about child classes inheriting attributes from the parent CLA Ss.
3. Use shorthand
Example: margin:0px 1px 0 0;
4. Importance of the use of the head style; important;
If you know this all of the H2 ' s would not have a margin or padding, define that on the top level and let it effect CASCAD e as it is supposed to.
Trying to standardize CSS code