PDA

View Full Version : Partial opacity



Lazaroth
Jul 4th, 2002, 05:36 PM
How should I proceed if I want to create table with partial-transperent background and non-transperent text inside?

:confused:

...and no two tables above eachother.....just one... :thumbsup:

jkd
Jul 4th, 2002, 06:16 PM
Use a semi-transparent PNG image as the background.

Now, that would be the solution, but it only seems Konqueror, Gecko (NS), Opera, etc.. every browser except for IE can do it.

Sk8er9547
Jul 4th, 2002, 07:43 PM
You can put this inside your tag:

style="-moz-opacity:1.5; filter:alpha(opacity=90)"

whereas "90" is the amount of transparency filtered out of the color.

jkd
Jul 4th, 2002, 08:37 PM
That makes the text partially opaque too.

Bosko
Jul 4th, 2002, 09:02 PM
Yes,even if you did set it transparancy to 0 on the table row it would still remain transparant,so PNG is the only way.

Candrias77
Jul 4th, 2002, 11:30 PM
How widely supported are PNG images? I have been wanting to use them quite often but was not sure which browsers it would actually work in.

For similar effects i have used a GIF image and had every second pixel transparent to get a semi transprent dither effect, not as good as using a PNG but did the trick for a couple of sites.

Guardian23
Jul 6th, 2002, 02:43 PM
Quote from jkd:

but it only seems Konqueror, Gecko (NS), Opera, etc.. every browser except for IE can do it.

Speaking of which, it seems that not only the image opacity style, but also a number of other attribs/objects (among them the annoying 'blink' attrib and the images object in JS) are NOT supported by MS IE. THIS can get annoying.

Does anyone how it is possible to achieve the "moz-opacity" effect in IE (if possible)? For while I have nothing against Mozilla and the rest, it's really not nice to have "Teacher's Pets".

Guardian23

BroChris
Jul 6th, 2002, 03:43 PM
You could make every other pixel of the background image transparent, giving it a semi-transparent illusion.

Bosko
Jul 6th, 2002, 04:03 PM
-moz-opacity:1.0; in IE would be filter:alpha(opacity=100)

Every graphical browser,except IE,supports PNG images good.

Quiet Storm
Jul 6th, 2002, 06:39 PM
Originally posted by jkd
That makes the text partially opaque too.

http://www.angelfire.com/mo2/cbch21/TEST/2Table.Opacity.html

Would have to use 2 tables, one on top of the other...

Bosko
Jul 6th, 2002, 07:49 PM
Originally posted by Quiet Storm


http://www.angelfire.com/mo2/cbch21/TEST/2Table.Opacity.html

Would have to use 2 tables, one on top of the other...

That page doesn't work in Mozilla or any other browser than IE :eek:

Quiet Storm
Jul 6th, 2002, 08:11 PM
Sorry.

My entire site is for IE only browsers.

That page is only an example - maybe someone can edit the code to support other browsers?