On Nov 13, 2007, at 10:06 PM, James Ellis wrote:
I still find it a bit odd that setting opacity on an outer box
affects the
opacity on the inner box. For instance when you have nested white
boxes each
with an opacity of 0.5 over a black background they both end up
having 50%
black backgrounds (~ #7f7f7f).
Opacity is not a function of background-colour, it affects the whole
box _and_ its descendants. That is, everything that is inside that
box will see its opacity lowered.
If they are positioned absolutely over each
other the the opacity works as expected, the top most one having the
expected "background colour" of #bfbfbf.
That would be the case if none of the boxes are descendants of each
other.
If you are looking to have a semi-transparent background, you have to
look for rgba or hsla colours.
These colour values are only supported by WebKit/Safari 3.0beta + and
Gecko 1.9a (what will be Firefox 3.0/Camino 2.0/SeaMonkey 2.0). I've
been told that Konqueror 4.0 will also support this (QT4).
You can of course use rgba or hsla colour for any property that takes
a <colorvalue> as value: border, background, etc.
Defined in the css3 color module
<http://www.w3.org/TR/css3-color/#rgba-color>
<http://www.w3.org/TR/css3-color/#hsla-color>
Philippe
---
Philippe Wittenbergh
<http://emps.l-c-n.com>
*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************