...

View Full Version : Transparency in all browsers



Daethian
11-25-2005, 07:41 AM
Is there a way to use transparency so its compatible with all browsers?

_Aerospace_Eng_
11-25-2005, 07:48 AM
What type of transparency? Using images or CSS?

Daethian
11-25-2005, 08:00 PM
I was trying to put up a background image and use CSS to make the header, content and footer transparent so it would show through. I got it to work with Opera but not FF or IE.

harbingerOTV
11-25-2005, 09:58 PM
Do you have a link by chance? If not, at least some code?

It's possible but kind of hard to tell you how to do it if we don't know exactly what your trying to do.

is it possible to just fake it with images instead of filters?

mark87
11-25-2005, 10:45 PM
Each browser really depends on their own declarations to make things transparent. So don't expect code to validate but this should provide transparency for most (if not all) current browsers.


khtml-opacity: 0.5;
-moz-opacity: 0.5;
filter: alpha(opacity=50);
opacity: 0.5;

Bill Posters
11-26-2005, 09:49 AM
khtml-opacity: 0.5;
-moz-opacity: 0.5;
filter: alpha(opacity=50);
opacity: 0.5;
Fwiw, in most cases, if not all, using CSS opacity renders the entire element semi-opaque. This means that any text, images, etc… will also be rendered semi-opaque.

In case that's not what the op is after…

If the idea is purely to have a semi-opaque/semi-transparent background, then you'll need to use a PNG24 image.

IE/Win doesn't natively support PNG24 semi-transparency, so you'll need to implement a proprietory CSS filter to kick-start the transparency in the PNG24 image.

See:
http://www.alistapart.com/stories/pngopacity/


IE5/Mac has buggy support for tiling of PNG24 background images, but it's a simple matter to use the band-pass filter (http://www.stopdesign.com/examples/ie5mac-bpf/) to supply IE5/Mac with overriding CSS that uses a single, larger, non-tiling background image which fills the background of the element.

I'm not sure of the IE/Win filter method's support for tiling background PNG24 images, but if it's a problem, you can use the larger, non-tiling background image in the IE/Win CSS override filter as well.

mark87
11-26-2005, 03:14 PM
Ah sorry, kind of misunderstood the question.

Daethian
11-28-2005, 11:26 PM
I don't have the code... I got frustrated and took it down. I went with something else for the time being but I may need to go back to this.

Bill thanks for the information. I'll mark this thread and come back to it when I have some more time to tinker with it.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum