Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    London, UK
    Posts
    127
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Montreal, Canada
    Posts
    644
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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>

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    Beyond Lament
    Posts
    424
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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!·

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Posts
    344
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •