I completely understand how CSS sheets are supposed to work, and it seems I have an issue I am unable to figure out.
I don't want to use frames or iframes for this, but rather a simple div container. I am trying to isolate user-based HTML submission data from the rest of the page. A user is able to input / copy-paste data into a field. This may contain styles and style tags. I obviously have stripped out any undesired scripting, external rels and what not. But I do need to allow the usage of styles inside this div as I display the user's content.
Problem: A body style declaration is overriding the master CSS sheet (as expected due to the CSS idea), consequently changing margins, a links, visited links, font sizes, etc. It then alters the template and renders it unusable in some instances.
True I can strip out the <style>, however it would remove all other id and class declarations as well.
So my question; is there some way to reverse the order in which CSS has priority, or is there a way to limit/isolate css content to a <div>? Is there some other solution someone can provide or idea that would help me out? I can successfully get this working with an iframe, or a new window, however I would prefer to get the content in one page without popup, or using a frame.
Hope this is clear.
Start Free Trial