views:

25

answers:

1

I'm trying to get a specific generated css for a area on one of my site's to use this css on the homepage from one of my site's.

I used all types of soft and ff add-ons to get the complete css for that specific area ,however they not combine the css as 1. I still have to copy/paste , and have chance i get duplicated loaded css.

My hope is that there exist a code snippet what read the css between 2 div's and generate a .css file on the fly. so i can use the generated css in another project. ( the reason i ask this is couse of there is over 4000 line of css loaded from different css files.)

+1  A: 

If you inspect an element (right click on it, "Inspect Element") in Chrome there's a styles window on the right, underneath that is Computed Style, this includes everything non-standard about that element including all ancestors properties that made it that way.

Using the styles listed under there, you can get everything together that made the style you're seeing.

Nick Craver
+1 lovely. This is something Firebug doesn't do. Remember to check the "Show inherited" box if you need the full definition.
Pekka
@Pekka - I so wish I could have my firebug and my chrome together though :'(
Nick Craver
@Nick true.... But I'm sure it'll be there one day :)
Pekka
@nick , this is almost the same what i get when i use firebug for FF.Then again , if i go tru the called style classes , i get the chance i load duplicated css.There's also no reason to load padding-bottom: 0px;padding-left: 0px;padding-right: 0px;padding-top: 0px;Also it do it only for a single div and not for the class elements between it.
@osc2nuke - The "class elements between" could be all duplicates...so a bit on a conundrum there. In "Computed Style" you just want the bold ones, everything else is default for that element type, taking only the bold doesn't work?
Nick Craver
@Nick , i truely thank you for trying to help.However , it isnt how i wantit , i dont want to go true all classes between them manualy , i want to have it fully generated , not click each element one by one and copy/paste test-drive.