BUG IFrame transparency in Internet Explorer

Posted by Nordes on August 18th, 2008 filed in HTML

While doing some style on the site I’m working on, I wanted to have my IFrame with an invisible background, so I can see the main page background. What I did, is what you would do normally to make it works on “good” browsers like firefox.

1
2
3
4
body.ClassName /* Page nested in the IFrame */
{
    background-color:transparent;
}

But, that code doesn’t work with IE. The thing is, when you have an IFrame inside IE, it automatically add the style attribute “background-color:#ffffff”. To remove that IFrame background-color, you need to add the following attribute on your iframe.

1
2
<iframe id="myIframe" allowtransparency="true" src="../myproject/page">
</iframe>


3 Responses to “BUG IFrame transparency in Internet Explorer”

  1. Sonora Says:

    Good words.

  2. buy levitra no prescription Says:

    thick dixit lifescience pirates looks goodman aspen layers thais jlscottngcsu stalin incoming

  3. ganool Says:

    thx for the info..

Leave a Comment