Keeping Things Inline In you CSS files
Ok we have started writing our CSS and it starting to get big and your forgetting what is what. How in the world are you supposed to keep track of everything? Well it is quite simple, and were going to start with comments. Lets have a look at how it is done.
*/
I can't stress how important it is to use comments. You should always keep a commented version even if you remove them when you upload the CSS file. It makes it so much easier when redoing part of the layout down the track. I not saying to add a comment for every line, but it is a good habit to divide your CSS up into sections and give them "titles" such as "header", "content", "footer" and "menu". Your really going to thank yourself when you came back to edit a file you wrote a year ago.
Nomenclature
Another important thing is to use classes and ids that make sense. Don't give something the id blue_header because it might become a red header. Give it the id of main_header for example instead. Again don't give something the class big_text it might become little red text. Give it the class important_text since that is what it is. Call it something that is short and easy to understand no matter what rules are applied to it. But don't go silly with the class or id names the_little_cute_image_down_the_bottom_of_the_page is just as bad as the_image. One is too long so it takes ages to type, the other does not explain what the thing is. It might be best to just call it my_avatar. This along with the comments only take a second to add when writing the CSS, but saves ages in the long run.