Link to home
Start Free TrialLog in
Avatar of cxs410

asked on

Trying to Figure out all The CSS that is used on a paticular page.

I have a website with a css file that is maybe 9000 line long.  Only a small fraction of the css on this page is still being used.  I need to figure out what lines are being used on a page. I'm hoping someone has a suggestion that is different than going through line by line and checking each line of hte css against the web page.

Avatar of littleknown

If the CSS document is linked in, all of those lines are technically, being used. I'm afraid there is no way currently for your browser to tell you what css is not making an effect on the presentation.
Avatar of scrathcyboy
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It would be faster to simply redo the CSS.
What I suggested does exactly that, but my steps preserve the exact CSS the page is using right now, and eliminates all the other unneeded baggage.
Avatar of cxs410


Looks like there isn't going to be a shortcut on this one.
No, it would be faster to simply get rid of the CSS document and just rewrite it. At least it would be for me, we are two different people.

At any rate, OP, don't forget to look for ID selectors too, which scrathcyboy did not mention. They're just as important as finding the class selectors.