Default background color of IFRAME

Discussion in 'HTML' started by Julian, Jul 29, 2005.

  1. Julian

    Julian Guest

    How can you set the background color of an IFRAME, before its contents
    appear?

    I know that an IFRAME must set its styles or use a style sheet of its
    own. My problem is that I have an IFRAME whose content is generated by a
    CGI script. It takes a couple of seconds to appear.

    My page has a colored background. Firefox paints the IFRAME with the
    background-color specified for the body. But in Internet Explorer the
    IFRAME initially appears as an ugly white box, until the content appears.
    --
    Julian
     
    Julian, Jul 29, 2005
    #1
    1. Advertising

  2. Julian

    Greg N. Guest

    Julian wrote:
    > How can you set the background color of an IFRAME, before its contents
    > appear?



    The "allowtransparency" parameter makes the iframe assume the background
    color of the surrounding page. See if that helps.
    <IFRAME src=... allowtransparency>

    --
    Gregor's Motorradreisen:
    http://hothaus.de/greg-tour/
     
    Greg N., Jul 29, 2005
    #2
    1. Advertising

  3. Julian

    Julian Guest

    Greg N. wrote:
    > Julian wrote:
    >
    >> How can you set the background color of an IFRAME, before its contents
    >> appear?

    >
    >
    >
    > The "allowtransparency" parameter makes the iframe assume the background
    > color of the surrounding page. See if that helps.
    > <IFRAME src=... allowtransparency>
    >


    That seems to do it, Greg. Thanks!

    --
    Julian
     
    Julian, Jul 29, 2005
    #3
  4. Julian

    SummerZ

    Joined:
    Jun 17, 2009
    Messages:
    1
    Thanks Greg

    Thanks so much Greg for this solution, it worked. I've been looking into how to change the iframe background color because the iframe appears on certain condition only so when it doesn't , it leaves that white box. All the developers I work with told me it's not going to work in Internet Explorer. They just didn't want to bother looking for a solution I guess. Thanks again :veryprou:
     
    Last edited: Jun 17, 2009
    SummerZ, Jun 17, 2009
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. foo
    Replies:
    4
    Views:
    3,584
    Whitecrest
    Oct 2, 2003
  2. Bill Burke
    Replies:
    0
    Views:
    961
    Bill Burke
    Sep 11, 2005
  3. fig000
    Replies:
    0
    Views:
    4,555
    fig000
    Sep 6, 2004
  4. Kamaljeet Saini
    Replies:
    0
    Views:
    427
    Kamaljeet Saini
    Feb 13, 2009
  5. Replies:
    1
    Views:
    272
    marss
    Feb 14, 2007
Loading...

Share This Page