Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Default background color of IFRAME

Reply
Thread Tools

Default background color of IFRAME

 
 
Julian
Guest
Posts: n/a
 
      07-29-2005
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
 
Reply With Quote
 
 
 
 
Greg N.
Guest
Posts: n/a
 
      07-29-2005
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/
 
Reply With Quote
 
 
 
 
Julian
Guest
Posts: n/a
 
      07-29-2005
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
 
Reply With Quote
 
SummerZ SummerZ is offline
Junior Member
Join Date: Jun 2009
Posts: 1
 
      06-17-2009
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
 

Last edited by SummerZ; 06-17-2009 at 08:14 AM..
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
IE7 won't let me define iframe background color AAaron123 ASP .Net 7 12-10-2008 01:24 PM
iFrame background color without using "allowTransparency" Bill Burke HTML 0 09-11-2005 07:29 PM
Problem with setting background color alternating item in datalist to a certain color fig000 ASP .Net Web Controls 0 09-06-2004 06:51 PM
Get form values from iframe (1) to iframe (2) inside a layer in iframe (1) Daedalous Javascript 3 01-16-2004 11:08 AM
<IFRAME> problem with text/background color in netscape foo HTML 4 10-02-2003 12:43 PM



Advertisments