Setting Opacity in layers/CSS

jag5311's picture

They have: 202 posts

Joined: Jan 2002

I am not sure where this is done, but I have seen some people who can set the opacity of a layer or an image to make the stuff behind it able to be seen. I am not sure whether this is done in CSS or just something handwritten in a layer tag.

If you know, please let me know:)

Thanks
Bryan

Busy's picture

He has: 6,151 posts

Joined: May 2001

its done by layer numbers and postioning, take a look at webmonkey.com I think they got a good example on their main page

I played with layers a while back but could never get the same results in all browsers

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

It's IE only, not part of the spec (though there is talk about it becoming part of it?) and it's actually IE/PC only. IE/Mac doesn't support it at all.

I just answered this on another board. Weird.

http://www.solardreamstudios.com/tutorials/css/trans.shtml

jag5311's picture

They have: 202 posts

Joined: Jan 2002

That solardreamstudios.com is an UNBELIEVABLE site. I really like his/her layouts, for his/her other sites as well. He/she offers quite a bit of good information.

dk01's picture

He has: 516 posts

Joined: Mar 2002

Well there are two ways. I think IE4 and up has the ability to do it using the filter method above but NS6 and 7 have a different way of doing it. As usual NS4 does not support it. Sticking out tongue
IE Method:
filter:Alpha(Opacity=100) // Completely transparent
filter:Alpha(Opacity=0) //Completely opaque

NS Method:
-moz-opacity: 0%; // Completely transparent
-moz-opacity: 100%; //Completely opaque

*Note* - NS method will also accept 1 and 0 as the respective opaque and transparent values. It is however worth mentioning that if you are going to use these for dhtml purposes you will have to detect the browser to know which to use.

Hope that helps some.
-dk

jag5311's picture

They have: 202 posts

Joined: Jan 2002

Is there a way to incorporate both set of filters so that it will incorporate users on Mozilla and IE??

bryan

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.