PDA

View Full Version : transparent iframes


zduck
09-22-2002, 12:35 AM
is there a way to make the back ground of an iFrame (or the page in the iFrame) be transparent to the background of the page that the iFrame is placed on?

-Joshua David

zduck
09-22-2002, 12:43 AM
okay never mind everyone i figured it out. But for anyone else with this problem. You just add the following tag to the iFrame...

allowtransparency="true"

Then you add the following to the body tag of the document shown in the iFrame.

style="background-color: transparent"

That's it.

-Joshua David

Quiet Storm
09-22-2002, 02:06 AM
Note: works for IE6 only...

:D

zduck
09-22-2002, 02:09 AM
yes, true but I only guarentee that my site will fully function in the latest version of IE. Its to much a of a pain and compromise to try and accomodate everyone. Netscape will catch up sooner or later, as will Opera. I love the newest features with technology :)

Quiet Storm
09-22-2002, 02:32 AM
I meant as opposed to IE5.5 or IE5.

I hate NS, too! :)

The workaround for IE5/5.5 is to position a background on the iFRAME to exactly match the original page. On my site there's an example of both:

First Page: Transparent iFRAME only works in IE6 - older IEs will see the black background of the iFRAME.

Second Page (chromeless): The iFRAMES have their own backgrounds exactly positioned using CSS to look as if they're transparent.

zduck
09-22-2002, 02:39 AM
if it isn't supposed to work on IE5.5 then how come it works on mine? I have IE5.5 and it works perfectly.

-Zduck.com

PS> Awesome Site. I love the nature theme. I've thought of doing something like that on mine. Still working out the details.

Quiet Storm
09-22-2002, 02:47 AM
Originally posted by zduck
if it isn't supposed to work on IE5.5 then how come it works on mine? I have IE5.5 and it works perfectly.

-Zduck.com

PS> Awesome Site. I love the nature theme. I've thought of doing something like that on mine. Still working out the details.

Works on IE5.5? Really?!

Huh... maybe it's just 5.0 that doesn't work - thanks for the new info! :)


And thanks for the compliment! The site is about 7 years old - took that long to get it to look like that... ;)

zduck
09-22-2002, 03:04 AM
I figured that it probrably only took a few months. I must have much more time on my hands than you. :) Of course being 16 helps there. LoL

c1lonewolf
09-22-2002, 08:03 PM
code works in IE 5.o and 4 too.
Great must add to my arsenal. be a great addition to my site
for GRAPHICS MAGIC© http://www.freewebs.com/dhcs/index.html

Always looking for new ideas to implement.I also plan on building a script archive soon as I figure out how.hehehe.

WebPlaya
09-23-2002, 05:16 AM
I am sorry "c1lonewolf", but dude, u got to stop advertising ur website man... and i guess there are way more practicale and not to flamboyant sites out there.. which are straight forward to the point... so please stop advertising dude..

:thumbsup:

Bosko
09-23-2002, 06:56 PM
AHUM!
Transparent IFRAMES work fine in Mozilla...

Tombo
07-01-2003, 05:06 PM
Question for you guys.. do you think it's posible to have the background a gradient? For example, only 50% transparent, otherwise black?