[Note: works with IE; tested with IE6 and above]
Update: Also, check out Todd's post on manipulating CSS using the content editor web part:- http://mindsharpblogs.com/todd/archive/2005/10/25/798.aspx
If you’re creating custom CSS files, or modifying the default CSS files, for SharePoint Server 2007 or Windows SharePoint Services V3 then you’ll appreciate the extensibility of the SharePoint CSS classes! You’ll also appreciate tools which you can use to quickly determine CSS classes currently in use throughout SharePoint sites and pages.
You can find the Microsoft SharePoint CSS reference at:- http://msdn2.microsoft.com/en-us/library/ms438349.aspx.
The above reference includes a listing of classes for the default SharePoint CSS file, CORE.CSS. It also includes a script sample which, when added to a SharePoint page, will dynamically expose the CSS classes used on that page through the IE browser. The reference suggests adding the script to SharePoint ASPX pages, but you can also add the script to a SharePoint master page to take advantage of the CSS referencing for all ASPX pages within a SharePoint site, including the default.aspx (or home page) and the forms, and view, pages of a site.
For instance, you could add the script to the default.master page by either:
- Adding the script directly to the default.master page located in %SystemDrive%:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPATE\GLOBAL\default.master
- Adding the script to default.master in SharePoint Designer 2007 – this will mean customizing the default.master page.
Add the script after the tag and before the tag in the page, shown here in SPD.

As you move your mouse around a page displayed in IE the script will expose CSS classes. This includes the home page and document library pages, and underlying subsite pages, such as team sites – any pages using the master page you’ve added the script to.

Forms and View pages:

Happy testing!