On Thu, 30 Aug 2007 11:35:51 +0900, Philippe Wittenbergh wrote:
> David Hucklesby wrote:
>
>>> One way to do this might be to use two DIVs, one superimposed over the 
>>> other. If
>>> one DIV has a background color and a fractional opacity, while the
>>> overlaid DIV has the text and (default) transparent background, I think 
>>> that may
>>> work:
>>>
[code snipped]
>>
>> Okay. I just tried my suggestion.
>>
>> Works in IE 6/7 and Opera.
>> Fails in Moz/ FF/ NS7 and Safari. (Text is semi-opaque too.)
>>
> IE doesn't understand opacity. period.
> Opera does something wrong with the layering.
>

Ahh. Thank you Philippe. Yes, Opera does seem to get stacking wrong
in a number of cases. Not quite as badly as IE 6/7 though ... ;)

> To get what you intended you'll have to give the 'foreground' div its own 
> stacking
> context, using position relative and z-index.
>
> Demo:
> <http://dev.l-c-n.com/_temp/opacity-test.html>
> (Opera still gets some stacking wrong; I don't attempt to fix IE - use on of 
> them
> proprietary filters).
>
I see we both reached the same conclusion. No need for the z-index,
though. (I notice your example does not apply z-index either.)

Thanks for the confirmation.

Cordially,
David
--

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to