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
    New to the CF scene
    Join Date
    Jun 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Colored Transparent-ish Background?

    WHADDUP! I think this is my first post. anyway...

    How would i get a colored semi-transparent background for a <div></div>? Like only SLIGHTLY transparent, a faded white if you're wondering, so that it supports the text but you can see the faint background image.

    ttthhhhanks.

  • #2
    Senior Coder koyama's Avatar
    Join Date
    Dec 2006
    Location
    Copenhagen, Denmark
    Posts
    1,246
    Thanks
    1
    Thanked 5 Times in 5 Posts
    Quote Originally Posted by keviokevio View Post
    How would i get a colored semi-transparent background for a <div></div>? Like only SLIGHTLY transparent, a faded white if you're wondering, so that it supports the text but you can see the faint background image.
    Your best bet may be to use a semi-transparent PNG background image for that div. This works in major browsers except IE6.

    In the future you may be using rgba-values to set a background color with an alpha value as detailed in the CSS3 Color Module. Currently there is support for this in at least Safari 2 and Firefox 3 (alpha).

  • #3
    New Coder
    Join Date
    Jul 2007
    Location
    Yorkshire, UK
    Posts
    54
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Shouldn't you be able to make a 1-pixel transulcent .png as the background-image and then just repeat it all over the div?

  • #4
    New to the CF scene
    Join Date
    Jun 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ooooo alright... PNG i'll try that, cool.


  •  

    Posting Permissions

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