I'm trying to display an HTML email by inserting the entire html code from an email into a div on a webpage.
The problem is that the styles of the email are overriding the overall website styles. So if an email has a red background then my entire site's background color is red.
How do I lock the inner html of the div that has the email html.
You need to address this issue by re-writing or fixing your CSS, otherwise do something like load the HTML email as an iframe and the contents will be isolated from the rest of the page.
Its simply pollution, you mix one set of CSS with another, they mix, and cause problems.