[thelist] CSS opacity question

Barney Carroll barney at textmatters.com
Wed Jul 11 10:53:08 CDT 2007


You should give the opacity to a child which you then position to appear 
behind the others:

<div style="position:relative;">
   <div style="position:absolute; top:0; right:0; bottom:0; left:0; 
z-index:1; background:/*as desired*/">
   </div>
   <div style="position:absolute; top:0; right:0; bottom:0; left:0; 
z-index:2;">
     <!-- PUT YOUR REAL CONTENT HERE --}
   </div>
</div>


Regards,
Barney


Dan Parry wrote:
> We currently have a Zen Cart installation running with a centre section that
> lives in a partially transparent div [1]
> 
>  
> 
> The problem is that all of the content of this div is being rendered at the
> same opacity level. Naturally enough. Question is: Is there a way to make
> the contents of the centre div fully opaque while leaving the background
> with its partial transparency?
> 
>  
> 
> This is the sort of thing I'll usually spend hours (days, weeks!)
> researching on the intergoogleweb (spell checker doesn't recognise that; how
> odd ;) ) but time is against me in a big way here
> 
>  
> 
> Many thanks to any help in advance
> 
>  
> 
> Dan
> 
>  
> 
> [1] http://cut-in-stone.co.uk



More information about the thelist mailing list