[thelist] CSS opacity question

ben morrison morrison.ben at gmail.com
Wed Jul 11 11:27:19 CDT 2007


On 7/11/07, Barney Carroll <barney at textmatters.com> wrote:
> 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>

This will work, although you may run into problems with how high/wide
the <divs> will be - how can you ensure that the background div will
be the same size as the content div?

You may have more luck by using a background png which is the opacity
and using  alphaImageLoader for IE, such as this:

http://www.daltonlp.com/view/217

ben
-- 
Ben Morrison
http://www.benjaminmorrison.com



More information about the thelist mailing list