
Do you use CSS on your site? I know more and more sites are using CSS as a standard. The problem is a lot of CSS you see is very messy. This weeks project is to clean up your CSS. Having bad code can effect users and bots so it is a good idea to clean up any problems in your CSS.
Finding your CSS
Some of you may not even know you are using CSS or not. To find out open your site in your browser and go to Tools and choose Source (or Page Source for FF). Scan your code or do a CTRL+F and look for anything with .css in it. Copy that link to your css as we will need that for the next step.
If you are using a WordPress blog you might have several CSS files look for the style.css file. For example for our blog the CSS file is here http://blog.bluefur.com/wp-content/themes/bluefur/style.css.
Ready, Set, Scrub
Now that we have the link to our CSS file we can open the Clean CSS site and paste your link into the CSS from URL box and click Process CSS.
You will see below that it will provide you a list of messages. Read them over to see if there are any issues. If there are then fix them in your CSS file.
If you get stuck let me know in the comments.





Tony Chung
November 15, 2008 2:15 pm
I’d also recommend that plugin developers ensure their code creates clean HTML and CSS as well. I’ve had to remove W3C buttons from my site because the plugins + the theme I chose = bad combo resulting in oddly nested tags. I hope to fix this when I hack my own theme, whenever that will be.
Firany
November 17, 2008 5:14 am
I think clear html is much more important than CSS. I forget about it – just leave it to my wordpress template developer.
InvestorBlogger
November 20, 2008 10:22 am
Do keep a copy of your original CSS file. If CleanCSS screws up, at least you can restore it easily. I know I made that mistake once already.
Kenneth