I have an website builder that uses builderstyles.css and then i have a div inside this that then shows the users website.
The problem is that the users website div is using both my builderstyles.css styles and also its own.
This is not what i want as the user can override my builderstyles styles and my builderstyles also effect the user styles.
I know i can just put the users website into a iframe but i can not do this for this application.
Is there a way to use completely different styles / stylesheet for a div and have it not effecting the rest of page ? is there another way ?
thanks
rick
HTML5 has a new
scopedattribute for the style tag. It’s presently not supported much at all, but there’s a polyfill available. Using this with the relevant styles and possibly a reset should get you where you need to be.http://html5doctor.com/the-scoped-attribute/
(pollyfill link also on that page): https://github.com/thingsinjars/jQuery-Scoped-CSS-plugin