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 3 of 3
  1. #1
    Regular Coder
    Join Date
    Oct 2008
    Posts
    130
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Mixed PNG (and Other PNG-Related Stuff)

    I have an image, 'image.png'. This PNG is half opaque (50%) and the other half opaque (100% or not opaque at all). As an image in my code, this is fine, but I am using it as a background of a div. Now, the PNG has an opacity of 100%. I heard that as a background, you must set the PNG's opacity with code. But then what is the point of a PNG?

    My two questions are: Can I get a PNG to be a background of a div with opacity and without using code? and Can this same PNG be half opaque and half not?

  • #2
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    PNGs are loaded in the same way in backgrounds. If you have 100% opacity all of a sudden, you're probably being fooled by a colored/white background. Link?

  • #3
    Regular Coder
    Join Date
    Oct 2008
    Posts
    130
    Thanks
    0
    Thanked 4 Times in 4 Posts
    Hmmm. It works now. I had to use a style sheet instead of putting it in the HTML markup.


  •  

    Posting Permissions

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