that heavy. two options, as I see it. You can set the wrapper div around all your content and the prefix of all your css. Example:
<body> <div class='wrappingDiv'> ... </div> </body>
style sheet:
.wrappingDiv * {}
Then, when you add jquery, use this to close the initial div wrapper in front of your content and wrap any next content in another div.
Questions:
- It is possible only by injecting other site content on your own site.
- This can get complicated depending on where you enter the HTML.
Another option is to load a reset stylesheet designed specifically for your nested html. In this case, only your injected html will be wrapped, but you will need a css file for which reset all attributes for all tags will be used by default before adding your own styles. No real problems here, just not very elegant ...
Another way would be to use an element that does not inherit a stylesheet, such as an iframe, but this is due to its own problems ...
source share