Previous Message
Next Message

<li> Opacity and inheritance to <a> in a navigation bar?

Sent by Philippe Wittenbergh on 20 January 2005 12:12


On 20 Jan 2005, at 6:27 pm, Tom wrote:

> I have a list in which the opacity of each <li> is set to make it 
> appear
> semi-transparent. In each <li>, I have a <a>. Does the opacity from 
> the <li>
> pass down to the <a> text? If so, how can I adjust this. I set an 
> opacity of
> 100 for the <a> but it seemed to make it appear rather funny. Thanks so
> much.

Opacity is not inherited, but all the contents of a box whose opacity 
is lower than 1 (<100%) will appear as semi-transparent (or faded). It 
is not applied to the background, but the box as a whole. All the 
children(the <a>) of that box (the <li> in your case) will be affected. 
Compare that to reducing the opacity of a layer in Photoshop or the 
Gimp.

If you only want a semi-transparent background, then your best bet is 
using a transparent PNG file for the background.

Philippe
---/---
Philippe Wittenbergh
now live : <http://emps.l-c-n.com/>
code | design | web projects : <http://www.l-c-n.com/>
IE5 Mac bugs and oddities : <http://www.l-c-n.com/IE5tests/>

______________________________________________________________________
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: