Results 1 to 5 of 5

Thread: Making a partially transparent BG

  1. #1
    Join Date
    Jun 2009
    Location
    United States
    Posts
    14
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Arrow Making a partially transparent BG

    Hi there,

    I have two iFrames and a table that I want to have black backgrounds that are 50% transparent. I've tried a few things now, I first started out with a partially transparent PNG, but the PNG wasn't working in IE. So then I tried to find a way to make the PNG work properly in both FF and IE. I tried some sort of pre-made behavior code or something for PNG that had a transparent GIF and an .htc file that you had to install along with a string of code. That didn't work and I was extremely intimidated by the code in the .htc file, so I ditched that idea.

    Next I found a CSS override, but this COMPLETELY overrides any backgound setting that I try to put in and instead makes it completely transparent. The good news, I got transparency to work in IE, bad news I don't have that 50% transparent black BG that I wanted.

    So then I remembered that there was a CSS myspace layout generator that could make the BGs of the tables transparent. I found which string of code that did that, and I got the BG to do what I wanted it to! However, everything else inside the iframes and the table cells wound up being transparent as well and I tried adding code to override that, but nothing worked. (The transparency makes the images really hard to see, so that was what I was worried about.)

    So, is there a CSS code that I can make that will do what I want only to the background? Maybe like some sort of filter, I dunno...

    I really appreciate any help given.

    -Raven

  2. #2
    Join Date
    Jun 2009
    Location
    Laputa
    Posts
    43
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    Yeah. background:rgba(0,0,0,0.5);
    That works in IE 7+, FF3+ Safari2+... Anything modern. It's code for a red,green,blue,alpha color. Set the 0.5 to something else for more or less transparency.

  3. #3
    Join Date
    Jun 2009
    Location
    Laputa
    Posts
    43
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    Sorry, I had javascript turned off from debugging earlier.
    To repeat (so it shows up)
    background:rgba(0,0,0,0.5);
    That works in IE 7+, FF3+ Safari2+... Anything modern. It's code for a red,green,blue,alpha color. Set the 0.5 to something else for more or less transparency.

  4. #4
    Join Date
    Jun 2009
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    there's a PNG fix that you can have IE install.

    http://www.twinhelix.com/css/iepngfix/

    Very simple to use and install.

  5. #5
    Join Date
    Jun 2009
    Location
    Laputa
    Posts
    43
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    do those work

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
  •