Displaying a HTML Email inside a <DIV> without changing the CSS of the website

I'm developing a pop reader. My question is how to display HTML emails with CSS inside a <DIV> without it interfering with the CSS of the rest of the page?
LVL 13
Who is Participating?
Roger BaklundConnect With a Mentor Commented:
I don't know how Mailbee does it.

Some very old browsers (like Netscape 4) and text based browsers (like lynx) does not support iframes. A common "fix" for this is to include the source URL of the iframe as a link within the iframe, for a gracefull fallback for such browsers:

<iframe height="400" width="600" src="MyIFrame.html">
<a href="MyIFrame.html">View content</a>

The a href is not displayed in browsers supporting iframe.
Roger BaklundCommented:
You can't. Write the email to a static (temporary) html file, and use iframe to display it.
Roger BaklundCommented:
... you don't have to use a html file, the iframe could also be dynamic.
Xyptilon2Author Commented:
Yes, IFrames could be a good option, though im just wondering how for example Mailbee does it from Afterlogic.com, they don't seem to use an iframe for their viewer. Any ideas? Are there any disadvantages to using an IFrame?
Xyptilon2Author Commented:
I decided to use the Iframe method, thanks.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.