View Full Version : Transparent Iframes


rundellt2000
10-03-2003, 09:21 AM
Transparent Iframes

*****

I'm surprised nobody's done this yet.

So anyway...

First, add the attribute "allowtransparency" to your Iframe.

<iframe src="whatever.html" name="content" width="500" height="200" frameborder="0" scrolling="auto" allowtransparency></iframe>

Then, on the page(s) in the Iframe you need to change the background color transparent.

*If your pages have a universal style sheet (one that is in a seperate file, added to your page using the <link> tag) find either the "background:" or "background-color:" attribute and change it's value (which would be either a word e.g. white, or a color code eg. #FFFFFF) to transparent.

*If each page has it's onw style sheet, then do the same as above on every page.

*If you don't use CSS on your pages, copy and paste this over your BODY tag.

<body bgcolor="transparent">

Congrats! We made a transparent iframe in only 2 steps! (it could have been 200 though, if you had to change the background color on each page individually :)).