Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-20-2002, 04:56 PM   PM User | #1
dhtmlhelp
Regular Coder

 
Join Date: Jun 2002
Location: London, UK
Posts: 127
Thanks: 0
Thanked 0 Times in 0 Posts
dhtmlhelp is an unknown quantity at this point
Transparency Level

Hi,

I am trying to set an iframe background to be opaque. I have managed to get a transparent background for the iframe using:

style="background-color:transparent" within iframe.html

and allowtransparency="true" in the page where the iframe is defined.

Is there any way of setting the transparency to 40%?

DHTMLHELP
dhtmlhelp is offline   Reply With Quote
Old 06-20-2002, 05:26 PM   PM User | #2
x_goose_x
Regular Coder

 
Join Date: Jun 2002
Location: Montreal, Canada
Posts: 644
Thanks: 0
Thanked 0 Times in 0 Posts
x_goose_x is an unknown quantity at this point
You coul;d always make a div that fills the whole iframe and give it a low z-Index, so it appears below everything else and then set the opacity of the div.

<div style="position:absolute; top:0; left:0; z-Index: -1; filter:alpha(opacity=50); background-color:green; width:100%; height:100%;"></div>
x_goose_x is offline   Reply With Quote
Old 06-20-2002, 09:47 PM   PM User | #3
Quiet Storm
Regular Coder

 
Join Date: Jun 2002
Location: Beyond Lament
Posts: 424
Thanks: 0
Thanked 0 Times in 0 Posts
Quiet Storm is an unknown quantity at this point
You can have the iframe transparent, but only in IE6.0

Check out my site for some examples...
__________________
Quíet Storm Designs ~ Art is not what you see, but what you make others see.
· the Storms· || ·Ultraviolent Winter· || ·Was Einstein Wrong?· || ·It´s About Time!·
Quiet Storm is offline   Reply With Quote
Old 06-21-2002, 02:27 PM   PM User | #4
QuackHead
Regular Coder

 
Join Date: Jun 2002
Posts: 344
Thanks: 0
Thanked 0 Times in 0 Posts
QuackHead is an unknown quantity at this point
Quote:
Originally posted by x_goose_x
<div style="position:absolute; top:0; left:0; z-Index: -1; filter:alpha(opacity=50); background-color:green; width:100%; height:100%;"></div> [/B]
filter: alpha(opacity=50) will only work in IE4+ and not in Netscape. Netscape 4.7 doesn't support transparency at all (as far as I know) but to get it to work in Netscape 6 you need to add this as well:

-moz-opacity: 0.50;

so, the div style attribute would now look like this...

<div style="position: absolute; top: 0; left: 0; z-Index: -1; background-color: green; width: 100%; height: 100%; filter: alpha(opacity=50); -moz-opacity: 0.50;"></div>

Just thought I'd let u know

~Quack
QuackHead is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 01:19 PM.


Advertisement
Log in to turn off these ads.