Commenting your CSS Code
Today I went back through the CSS code for our homepage at Dogbark.com and I realized how messy everything was. When I was working on that project I thought to myself, “I’ll remember why I did this when I come back to it.”
Well 10 sites and 2 months later I had no clue why I did the things that I did in that stylesheet. I went back in and added some basic comments into the code so that I (or whomever else may be working on the site) actually know why things are listed in there the way they are.
You can see that I used the normal CSS comment by typing /* before my comment and */ when I am finished. That allows me to break the file into segments. When you have a stylesheet that’s 300 lines long, i can get very jumbled, and this is one sure fire way to make sure you remember everything that you were working on even if it’s several weeks before you see it again.
Hope this helps someone out, it sure worked for us.
