stylesheets and javascript

B

Bert

Hello,

Hoping someone here can help maybe...

I have a problem for which I surely can find a solution but I was hoping
there might be an easier solution.

The thing is I want to convert stylesheet rules. What I would like is to
obtain a stylesheet rule for an element
that isn't relative anymore to the document, but is defined for the element
itself.
For example we have a <span> element somewhere in the document tree, which
has a layout according to rule: 'body #menu .menuitem span h1'.
Now let say we want to take all html from this span and put it in another
document.
Then the stylesheet rule would become simply 'h1'.

So how can I convert a .css to be able to render different elements
stand-alone, preserving the layout.

I was thinking about parsing all the rules and walking through document
tree, and
convert each rule myself but maybe this is done already or maybe someone
can think of a more elegant solution.

thanks in advance, greetings Bert
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top