Solved

determining where a CSS style is used

Posted on 2011-03-24
5
290 Views
Last Modified: 2012-05-11
Is there a tool that will tell me where, if anywhere, a CSS style is used in a site? I've inherited a site and I have a feeling that a lot of the 3900+  CSS styles in the style sheet are no longer used anywhere. I'd like to clean up the style sheet. I use Dreamweaver for site development and normally preview with Firefox/Firebug.

Thanks for any info.

0
Comment
Question by:steva
5 Comments
 
LVL 40

Expert Comment

by:gurvinder372
ID: 35207950
if you just right click on any element, and select option 'Inspect Element', it will show where the styles are picked up or inherited from
0
 
LVL 7

Expert Comment

by:kpmartin
ID: 35207986
Install the "web developer" add-on and select "display ID & class info" under the information tab.
kevin
0
 

Author Comment

by:steva
ID: 35208610
The things you guys suggested tell me the class and ID that a given element uses.  But I want to go the other way.  Given a style rule in the style sheet, which elements, if any, use it. I'd like something to tell me for all the unused style rules, something like: "not used" so I can delete it and clean up the style sheet.
0
 
LVL 16

Accepted Solution

by:
s8web earned 500 total points
ID: 35208858
0
 

Author Closing Comment

by:steva
ID: 35209758
Perfect!

Thank you.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
css, html 6 29
Paper tearing animation 6 41
Change properties of a dialog box 1 19
Box Model and Styling 12 20
This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now