tags:

views:

106

answers:

3

I have found http://www.sitepoint.com/dustmeselectors/ which does about the opposite of what I want, identifying selectors in CSS that aren't used in HTML.

I want a tool that will find elements that have a class attribute but the class isn't defined in any CSS being loaded by the page.

Thanks

A: 

No tools that I know of.

Seems like a good candidate for a short program, since you probably don't need to do this terribly often.

I'd regex out the class="someclass" from my source html, use the Web Developer's Toolbar in Firefox to get a concatenation of all my CSS, and regex out `.someclass', and then compare the two lists.

Triptych
A: 

You could do a find using a text editor in your css file for classes you find in your HTML.

alex
+1  A: 

If the CSS file is correctly linked within your page and a part your project, then in VS.NET 2008 it'll give you a the standard little squiggle warning.

Reddog
the problem is that many of the CSS files are dynamically added and I'd like to find the issues in the final page.
Jeff Martin