Forum Moderators: open

Message Too Old, No Replies

Transparent Background

I need to be able to make a table semi-transparent...

         

Suler

4:07 pm on Jun 17, 2006 (gmt 0)

10+ Year Member



Hi,

I want to make a table transparent, but I don't want it to be all the way transparent, I want it to look more like a faded background color so that they can still somewhat see the information behind the table as i'm using that table inside a span.

Thanks in advance,
Suler

MatthewHSE

8:42 pm on Jun 17, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



First off, a table shouldn't be nested inside a span. Put it in a div instead.

To actually answer your question, I don't know if there's really a good way of doing what you want. You're apparently using CSS positioning to "layer" the table on top of another element, otherwise you wouldn't have content appearing "behind" the table at all (unless you're talking background colors or images on the containing element). So, how about creating a 4x4 .gif image where the top left and bottom right pixels are transparent, and the top right and bottom left pixels are white or light gray? Then, tile that as a background image for the table cell. That might give something similar to the result you want.

Keep in mind, I've never tried that myself. Results are not guaranteed! ;)

Robin_reala

9:11 am on Jun 19, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



In CSS3, something like:

table { background-color: rgba(255,255,255,127); }

which would give you a half-transparent background to the table. Unfortunately this is currently only supported by Safari (and Firefox 3 alpha builds). The alternative is to use an alpha-transparent PNG as a background graphic. This doesn't work natively in IE but can be hacked around relatively easily - search WebmasterWorld for "alpha png".