Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    May 2008
    Posts
    119
    Thanks
    13
    Thanked 0 Times in 0 Posts

    Transparent iframe problem

    Hi All,

    I am having a difficult problem with iframe transparency / inherit. The iframe sits on a HTML page within a DIV with a grey background. In Chrome, IE9 and FF the iframe (which is a separate HTML page) BODY inherits the grey background background of the first DIV. However, in IE8 it doesn't, and simply has a white background.

    Can anyone suggest what I should be using to try and force this through? I have tried the following for the iframe stylesheet:

    body {
    background-color: inherit;
    }

    body {
    background-color: transparent;
    }

    body {
    background: inherit;
    }

    body {
    background: transparent;
    }

    However, they all seem to have the same results.

    Help appreciated!

    Thanks,
    Neil

  • #2
    Regular Coder Amphiluke's Avatar
    Join Date
    Jul 2009
    Posts
    312
    Thanks
    3
    Thanked 89 Times in 89 Posts
    Have you tried to use the allowTransparency attribute?
    Code:
    <iframe src="banner.html" width="468" height="60" allowTransparency></iframe>
    I am still learning English

  • #3
    Regular Coder
    Join Date
    May 2008
    Posts
    119
    Thanks
    13
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Amphiluke View Post
    Have you tried to use the allowTransparency attribute?
    Code:
    <iframe src="banner.html" width="468" height="60" allowTransparency></iframe>
    Works great - thanks!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •