IFrame background transparent in IE

56,776

Add allowTransparency="true" to your iframe

<IFRAME ID="Frame1" SRC="whatever.htm" allowTransparency="true">

For whatever.htm add background:transparent to its body tag.

<body style="background:transparent">
Share:
56,776

Related videos on Youtube

Thew
Author by

Thew

Hi, im Thew, 20 years old, and PHP / HTML / MYSQL developer.

Updated on May 27, 2020

Comments

  • Thew
    Thew almost 4 years

    So i have this iFrame with the class .transparentbg:

    .transparantbg{
        background-color: transparent;
    }
    

    This works fine in Chrome, but not in IE...

    Help please?

    Greetings

  • pranky64
    pranky64 about 12 years
    great! this works perfectly for IE8 but i'm still having problems with IE7 its still showing a white background in place of transparent any ideas.??...
  • Han Dijk
    Han Dijk almost 12 years
    Yes, live with the fact that a very small percentage of your users will see a white background instead of a transparent one.
  • Wasim A.
    Wasim A. over 11 years
    ah, after two days, i found this solution. many many many thanks to both you guys
  • cage rattler
    cage rattler about 10 years
    If anyone is seeing further issues, I'm finding that in IE8, when an existing iframe changes it's source, the html tag within it must be styled as well.
  • bbodenmiller
    bbodenmiller almost 10 years
    appears IE9 doesn't require the allowTransparency="true" part.