[thelist] Change Iframe background colour

Brian Hurtt bhurtt at mindspring.com
Thu Dec 11 05:42:58 CST 2003


is there a reason you don't just set the background color in the iframe's
src document (subscribe.htm)?

-----Original Message-----
From: thelist-bounces-bhurtt=mindspring.com at lists.evolt.org
[mailto:thelist-bounces-bhurtt=mindspring.com at lists.evolt.org]On Behalf
Of Ben Morrison
Sent: Thursday, December 11, 2003 3:39 AM
To: thelist at lists.evolt.org
Subject: [thelist] Change Iframe background colour


<bump>
Is this possible?
</bump>


http://www.pup-e.co.uk/sitecheck/iframetest.htm


I cant find a x-browser solution to change the background colour of an
iframe, ie seems to work fine, but no luck in safari, here is my current
code:



function change_background() {
    document.frames.subscribe.document.body.style.backgroundColor="#CCFF66";
}

<iframe src="subscribe.htm" id="subscribe" name="subscribe"></iframe>

I have tried (with no results):

document.getElementById('subscribe').style.background="#CCFF66";

I also tried using css to set the iframe properties:

#subscribe{
    background:#CCFF66;
}

iframe {
   background:#CCFF66;
}

Any pointers much apreciated, I have read that the *new* version of safari
will support iframe transparency.

Benjer


--
* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !



More information about the thelist mailing list