Previous Message
Next Message

Problem with Opacity Inheritance

Sent by Peter-Paul Koch on 30 September 2004 10:10


> <!--body has a nice bg of red-->
>         <body style="background: #cc0000; padding: 2em;">
>                 <!--div has a nice translucent background of blue, making purple-->
>                 <div style="background: #3399ff; filter: alpha(opacity=50); -moz-opacity:0.5;
opacity: 0.5; width: 100%; height: 100%; padding: 2em;">
>                         <!--div has a nice solid background of white, but inherits
translucency-->
>                          <div style="background: #FFF; width: 100%; height: 100%">
>                                 <!--h1 has a color of black AND tries to reset opacity to
100%-->
>                                 <h1 style="filter: alpha(opacity=100); -moz-opacity:1; opacity:
1; color: #000;">transparency sucks!</h1>

Opacity for the H1 is 50% (inherited) and 100% of 50% is 50%. So try
an opacity of 200% for the H1.

This worked for me in the past. One of the browsers doesn't want to
play nice, though, probably IE Win, but I can't remember the details.

-- 
-------------------------------------------------------------------
ppk, freelance web developer
Interactie, copywriting, JavaScript, integratie
http://www.quirksmode.org/ 
------------------------------------------------------------------
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread: