Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 411
  • Last Modified:

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?
0
Xyptilon2
Asked:
Xyptilon2
  • 3
  • 2
1 Solution
 
Roger BaklundCommented:
You can't. Write the email to a static (temporary) html file, and use iframe to display it.
0
 
Roger BaklundCommented:
... you don't have to use a html file, the iframe could also be dynamic.
0
 
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?
0
 
Roger BaklundCommented:
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>
</iframe>

The a href is not displayed in browsers supporting iframe.
0
 
Xyptilon2Author Commented:
I decided to use the Iframe method, thanks.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now