..oO(Dan Joyce)
Quote:
I've been reading ALL over and can't find a group who agree:
I'm trying to make some <TD> backgrounds semi-transparent. I've created
semi-transparent images and put them in. It works only if they are completely
transparent. What a mess. |
GIF doesn't support alpha-transparency. Use a PNG instead, which will
work well in all recent browsers.
Quote:
I've also tried all the lovely "background : filter:alpha(opacity=75) ;
-moz-opacity: 0.75;opacity: 0.75;-khtml-opacity: 0.75; " stuff. It works for
all but IE, imagine that. Except that it makes EVERYTHING - text and all -
transparent. |
Yep. Remove it. It's not what you want in this case.
Quote:
So, how can I make these semitransparent backgrounds what will work in all
browsers? |
Your only problem is IE. For this you could load the background PNG with
its AlphaImageLoader(). Put it in an extra stylesheet and link to it
within a conditional comment, so only IE will get it. See the example on
http://mfesser.de/test/transparency/
Quote:
If I can't, how do I make IE just plain ignore the transparency part
and use the color? |
This is possible as well. IE doesn't support advanced selectors like
child selectors for example. This can be used to "hide" certain
selectors and properties from it, but it's still kind of a hack.
Micha