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 11 of 11
  1. #1
    New to the CF scene
    Join Date
    Feb 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Image Opaqueness In Html

    I am having a problem with an html site i am doing. I am trying to lower the alpha of an image that is the background image for one of my tables.

    However when I make the opacity lighter it makes all the text lighter even though this command is included within the <> with the background image source.

    This is a strange problem and a little difficult to explain hopefully i made it clear. If anyone knows a way to fix this i would greatly appreciate it thank you.

  • #2
    Senior Coder
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    2,469
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Do you have a sample of the code you are using? There are a few ways to make opacity, some being just for IE, some being for firefox... so I'd need to see what and how you are doing it
    // Art is what you can get away with. <-- Andy Warhol
    ...:.:::: bradyjfrey.com : htmldog : ::::.:...

  • #3
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    I'd consider using pngs; IE doesn't support the alpha transparency of them but there are workarounds. Here's a site where I used that technique, dig around the source and see if maybe it can work for you...

  • #4
    New to the CF scene
    Join Date
    Feb 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by bradyj
    Do you have a sample of the code you are using? There are a few ways to make opacity, some being just for IE, some being for firefox... so I'd need to see what and how you are doing it
    Thanks for the quickly reply the command i am using is:

    style = "filter:alpha(opacity=40)"

  • #5
    New Coder
    Join Date
    May 2004
    Location
    Some place called the Earth I think...
    Posts
    99
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i'd suggest u do somthing like:

    <style>

    .alphathing {filter:alpha(opacity=40);}

    .alphathing *{filter:alpha(opacity=100);}

    </style>

    the * makes everything inside the .alphathing div or span or whatever fully opaque, so ud have to make a div inside a div
    Dont do drugs, get high on life

    13 years and getting nowhere fast.....


    đ­˘M_M÷˝kŔą

  • #6
    Senior Coder gsnedders's Avatar
    Join Date
    Jan 2004
    Posts
    2,340
    Thanks
    1
    Thanked 7 Times in 7 Posts
    That only works in IE, you'd need to use opacity as well to support Gecko based browsers and Safari.

  • #7
    Senior Coder
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    2,469
    Thanks
    0
    Thanked 0 Times in 0 Posts
    that is IE only -- to do IE and Mozilla builds, you'd do:
    Code:
    filter: 
    alpha(opacity=50); /*IE */ 
    -moz-opacity: 0.50; /* mozilla*/
    But doing that is still not recommended, it's not a standard. PNG transparency would be best, then you'd have to use javascript or another filter to force IE to play nice

    If the transparency is affecting the whole element, that makes sense -- say you have a div, and put transparency on that div, I'd imagine there would be scenerios where it would filter down to what's inside the div.

    But to fix that, there doesn't seem to be much luck:
    http://www.experts-exchange.com/Web/..._20945286.html

    I would suggest the png method of choice.
    // Art is what you can get away with. <-- Andy Warhol
    ...:.:::: bradyjfrey.com : htmldog : ::::.:...

  • #8
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    or another way that i found will work for FF
    Code:
    filter: 
    alpha(opacity=50); /*IE */ 
    opacity: .5; /* mozilla*/

  • #9
    Master Coder
    Join Date
    Feb 2003
    Location
    Umeň, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    Brady: You forget the standards way of doing it. (Supported by recent Mozillas and Safari.) <http://www.w3.org/TR/2003/CR-css3-co.../#transparency>
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #10
    Senior Coder gsnedders's Avatar
    Join Date
    Jan 2004
    Posts
    2,340
    Thanks
    1
    Thanked 7 Times in 7 Posts
    That's what I said... Just badly...

  • #11
    Senior Coder
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    2,469
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by liorean
    Brady: You forget the standards way of doing it. (Supported by recent Mozillas and Safari.) <http://www.w3.org/TR/2003/CR-css3-co.../#transparency>
    Ahh, I'm slipping
    // Art is what you can get away with. <-- Andy Warhol
    ...:.:::: bradyjfrey.com : htmldog : ::::.:...


  •  

    Posting Permissions

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