Solved

determining where a CSS style is used

Posted on 2011-03-24
5
336 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
SSL stands for “Secure Sockets Layer” and an SSL certificate is a critical component to keeping your website safe, secured, and compliant. Any ecommerce website must have an SSL certificate to ensure the safe handling of sensitive information like…
This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

691 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