SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    $postcount++; koomann's Avatar
    Join Date
    Feb 2003
    Location
    Posts
    428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Transparent background - possible workaround?

    I don't know if this will work, and since I have to run to class in a few minutes, I don't have the time just this second to see if this will work:

    Transparency within an element only affects text and images (at least for me, thus far - please correct me if I'm wrong), but I want to get the background of an element to be slightly transparent. If I were to set a 1px by 1px white image as the entire background of the element and then alter the transparency, do you, all-knowing SP regulars, think my transparent bg problem will be fixed?

    Here's a clearer idea of what I'm trying to do: Test site. Where the globe displays inside the content, I want to see if it's possible for that part of the image to be displayed behind the slightly transparent background.

    Sorry if the post itself doesn't make much sense - I'm rushing just a tad Thanks!
    [--Wings--]

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,877
    Mentioned
    160 Post(s)
    Tagged
    4 Thread(s)
    but I want to get the background of an element to be slightly transparent
    I'm a little confused because as you see the background of your #page element is already transparent. If the globe were underneath that #page box then you would still see it showing through.

    Opacity affects all the content of the element as a whole - background included. You have reduced the opacity of #page so it almost matched the body background color anyway so the effect seems wasted.

    If you only want transparency to affect the background and not the foreground then you would need to use a transparent png (or a half transparent gif for ie - or use the alpha image loader filter).


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
  •