Options - Not fully automated, but it's a bit closer then some of the answers above. I know this post is old, but I came upon it looking for the same answer and was so frustrated with the many crap answers that I thought I would post something useful for future searchers.
1. Use this dreamweaver query
<queryparams matchcase="false" ignorewhitespace="false" useregexp="true" wholeword="false" />
<qtext qname="/\*[\S\s]+?(?=\*/)\*/" qraw="true"></qtext>
<replace action="replaceText" param1="" param2=""/>
more details on use at http://foundationphp.com/tools/css_comments.php
2. Use an online minify tool such as http://www.shrinker.ch/
For those who answered with: why bother? If you don't have an answer then don't post an 'answer'. Your comments are of little value and just hinder others looking for the same answer.
I started with a dreamweaver template and wanted to get rid of the comments because I didn't need them and they were simply taking up space and were annoying to sift through to find the parts I wanted to edit.
I ended up minifying then applying source formatting in dreamweaver to get it cleaned up.
By the way the 'few' kb/s that were saved in this case turned out to be an 80% reduction. Sure it was only 5kb reduction from 6 to 1kb, however if you had 100,000 people visit your site in a month that is half a gig of data extra and that is just one file.
I use code comments to help me and others understand what "thinking" went into the project during development. Comments are beneficial to me & essential for others who may eventually take over the site. I never strip them out. YMMV.
I agree. Most of these responses are infuriating, and typical of some know-it-all dev's. I know not every dev is like this but it's very common, and sadly, especially so on forums.
"Why remove comments?" ... I have inherited a website project that includes a CSS file with a total of well over 9000 lines. It is so huge and messy that it's actually slowing DW right down. I have trimmed about 2,500 of them, and I believe I can trim another 20 - 30% just by removal of the commented out sections, but that's a time-consuming job on an 8000 line file.
So, Thurstanh, thanks very much for the USEFUL reply.
Thanks, Thurston, for the one useful reply. I too inherited some very messy code, created by someone who used Word to build websites. I came here to find out how to quickly remove it.
I'm not interested in explaining why I want comments removed, nor am I interested in lessons as to why comments are good to have. I want an answer to my problem so I can get on with my work. I came here to find out of Dreamweaver could help me. And yes, Nancy, my mileage varies very much from yours.
I did find an answer on another site: Under 'Commands' in top menu bar, choose 'Clean up HTML / XHTML'. In dialog box, chose 'Non-Dreamweaver HTML comments'. Silly me -- I use this function all the time to clean up code and get rid of unwanted tags but never noticed it could get rid of comments as well.
You can also use Regular Expressions in DW's Find/Replace tool to take comments out:
Specifically Part 2 talks about removing CSS comments...