I have some html being embeded on websites but is gets messed by the page it’s embeded in’s css. How can I make it so that doesnt happen… My content has a specific ID and it’s css is very specific. It contains images, divs, spans, h tags, p tags.. all the usual stuff. The style sheet for MY div is appended to the head.
Any ideas?
Provided I understood your question correctly, you could recursively iterate through the child elements of your
divwith JavaScript and reset theclassandstyleattributes. See this fiddle or the following code snippet: