Results 1 to 4 of 4

Thread: How to get image transparency

  1. #1
    Join Date
    Jun 2009
    Posts
    3,960

    How to get image transparency

    I have a page body of <div> transparent. To be sure it works on all browsers, I got the transparency with
    Code:
    filter: alpha (opacity = 80); 
    opacity: 0.80; 
    -moz-opacity: 0.80;
    Good so far it works. In the inside of these boxes I have a picture but it is also transparent. This is normal because it inherits properties. But how can that image is not transparent? I tried by creating a div just for the image
    Code:
    filter: alpha (opacity = 100); 
    opacity: 1.00; 
    -moz-opacity: 1.00;
    But it is not working, new properties do not replace the previous. The only solution I found was out of the picture are container. Someone would have any idea? How can I make the images in the boxes on my website transparent?

  2. #2
    Join Date
    Nov 2008
    Posts
    1,192

    Re: How to get image transparency

    What you want is to see the background in the blue blocks but not in the pictures, right? So this should work with the "Display" property. The display property specifies the type of box an element should generate. The display property is supported in all major browsers.

  3. #3
    Join Date
    Jun 2009
    Posts
    3,960

    Re: How to get image transparency

    I did several tests not only with display but also with z-index but nothing changes. What I actually want is that the blue box (which contains the image) is transparent as well as the opaque image. To get a better idea, you can see simply your desktop wallpaper images that explains everything!

  4. #4
    Join Date
    Nov 2008
    Posts
    1,054

    Re: How to get image transparency

    Are you sure that you declare your properties in opacity on div 2 levels? If you make a div transparent, everything inside in it is transparent. For that: either you put a transparent background png, or you make 2 div and you fill it with z-index, and one that you want to make transparent.

Similar Threads

  1. True transparency problems, please help
    By Mrigankasekhar in forum Customize Desktop
    Replies: 5
    Last Post: 24-04-2010, 05:57 AM
  2. Transparency Antialiasing
    By Aldous in forum Hardware Peripherals
    Replies: 5
    Last Post: 15-04-2010, 11:16 PM
  3. PNG transparency problem in Vista
    By Kieran in forum Customize Desktop
    Replies: 2
    Last Post: 28-02-2009, 12:52 PM
  4. PNG transparency in internet explorer
    By Rixwel in forum Technology & Internet
    Replies: 6
    Last Post: 19-02-2009, 11:45 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,727,016,520.45028 seconds with 17 queries