I’m wondering if it’s possible to restore an element’s style to it’s ‘default’ state, with Javascript or otherwise.
I need to do this because I’m inserting HTML into 3rd party web pages and cannot control what styles they attribute to different elements. For instance, they may have:
div { margin: 10px; padding: 5px; line-height: 10px; font-size: 150%; border: 10px solid yellow; foo: bar; }
Is there an easy way to clear out all of the styles and set it back to the ‘default’ settings? Is there even a list of default styles?
Thanks
It appears that someone has already asked this question on SO.
CSS Reset, default styles for common elements