Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a massive External Stylesheet with code for many different pages. My problem is that I need to identify only the CSS for one of my pages without having to sort through thousands of lines of code to figure out what is relevant to this one particular page.

Does Dreamweaver have a way to automatically import only the relevant CSS, paring down my massive external stylesheet into a more-concise internal stylesheet that only includes code relevant to this one particular page?

Thank you kindly!

share|improve this question

2 Answers 2

I don't believe that can be done with Dreamweaver alone. Assuming you have Firefox, you can install the Firebug add-on and the CSS Usage add-on to scan the page and identify the used and unused CSS rules. Then you can hit the "Export cleaned CSS" button and copy the CSS rules that are used in your page and paste it into Dreamweaver.

Firebug add-on: Download Here

CSS Usage Firebug extension: Download Here

share|improve this answer
    
GREAT Aznfin - THANK YOU! I figured out to use Firebug, but I had no idea that the CSS USAGE EXTENSION was available - you've really helped a lot, many thanks! It's a great suggestion - take care, Jamison –  Jamison Feb 14 '10 at 14:56

There are two things you can do - number one is simply to click the Current button and it should only show the CSS related to the current element.

alt text

The other method is to highlight any element and wait for the cogwheel icon to appear, when you click on this, it should bring up a list of all CSS elements used by the selection, you can then click and jump to.

alt text

share|improve this answer
    
Hi Wil- Thank you for looking at this. Actually, you're answer is very good but not exactly what I need! You see, I have an external stylesheet with thousands of entries, but only 10% of the code applies to the current page I'm working on! It's nearly impossible to manually go through the entire external sheet to find which CSS rules apply to my page, and which do not. For that reason, I wanted to know if there's a way to "import" only the relevant CSS rules from the external stylesheet, while ignoring all the rules that are not applied on this particular HTML page? Thank you! –  Jamison Jan 17 '10 at 10:24
    
Sorry, I am not sure there is anyway to do what you want with dreamweaver :( –  William Hilsum Jan 17 '10 at 17:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.