Hi guys,

iframe allowtransparency doesn't seem to work on IE7 and IE8. Users with OS Win7 don't have that same problem. Can anyone help?

Thanks, C.

Dani AI

Generated

Short version for : allowTransparency by itself won't make an iframe show the parent page through. It is an IE-only flag that allows the framed document to be transparent, but the framed page must actually use a transparent background. If the iframe loads a third‑party site (for example an external domain), the parent cannot force that page transparent.

Practical checklist (build on 's suggestion):

  • Keep allowTransparency="true" on the iframe (IE needs that flag).
  • In the HTML page you load inside the iframe, make sure the document itself uses a transparent background. Example CSS for the framed page:
    /* put this inside the page that is loaded into the iframe */
    html, body {
    height: 100%;
    margin: 0;
    background: transparent;
    }
  • Make sure the framed page is not forcing a background color on html or body elsewhere (some styles set color on html only).
  • Test with a same‑domain minimal HTML file first. If that works but the real content doesn’t, the problem is inside the framed page.

Troubleshooting tips:

  • Check IE Developer Tools (F12) -> Document Mode / Browser Mode to ensure the page isn’t rendering in quirks/compatibility mode; use a standards doctype.
  • Clear cache and test with a minimal test file (about:blank replacement) to isolate parent vs framed-page issues.
  • If the iframe loads cross‑domain content you cannot change its CSS remotely; transparency requires cooperation from the framed page.

If making the embedded content transparent is not possible, consider alternatives: load the content via AJAX and insert into a parent DIV, or redesign so you don’t need iframe transparency. Thanks to for the iframe flag pointer and to for the follow‑up.

Recommended Answers

All 2 Replies

Try this

<iframe src="www.google.com" name="main" allowtransparency="true"
 width="820" height="550" frameborder="0" id="if_main"></iframe>

: - thanx...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.