Search code examples
htmlcssmaterialize

How to keep the styling of html retrieved from a server?


I am working with the Gmail API and am retrieving the emails as HTML. I want to display the emails on my site but the styling of the emails is getting messed up due to me using the materiazlizecss frame work for other parts of my site.

When I remove the materializecss css file from the page, and just load the emails in a simple div, the styling is left intact, but gets messed up when I add it in. What is the best solution to this? Is there a way to ignore the css file for certain sections of the html?


Solution

  • Can you try using iframe for your mail content?

    You could also try using different CSS class for mail content.