Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How Can I Make a TABLE With A Semi-Transparent background?

Status
Not open for further replies.

JNeave

Programmer
Jan 28, 2002
125
GB
I use filter: alpha(opacity=80), but that makes EVERYTHING in the TABLE transparent, event if I explicitly state that the contained controls (INPUT, etc) have OPACITY=100. Ideally i am looking for a way to only make one particular colour translucent. Is there a way to combine CHROMA (I think I mean, croma, the tag that makes on particular colour 100% transparent) and ALPHA?

cheers,

Jim
 
Here's a trick:

Build a 2x2 pixel gif in your image editor, where the top-left and bottom-right pixels are transparent, and the other two pixels are some other color. Set this as a tiled background-image for your table. This should give the illusion of 50% opacity bg.

Apart from this check into using a .png image as a tiled bg. PNG can support a variable opacity channel on some user agents.
 
Aha, so png CAN support variable opacity. I thought so. Any idea how you can do this nice and simple on PSP7?

cheers,

Jim.

PS filter: alpha is pretty slooow, is the gif/png method any faster?
 
Re: PNG with alpha transparency....

Creating PNG-24bit with Alpha Transparency in PSP 7:
Create your graphic with transparency as desired. When you're ready to export:
1. Choose File|Export|PNG Optimizer
2. Click the "Transparency" tab
3. Choose "Alpha Channel Transparency" from the first list
4. Choose "Existing Image or Layer Transparency" from the second list.

HOWEVER (there's always something....)

Support for PNG-24 alpha transparency:
While you can create PNG-24bit files which support alpha transparency, few browsers have native png readers capable of reproducing it accurately:
Netscape: 7.0 and 6.2 do, and 4.x does not
Internet Explorer: 6.0,5.x and 4.x do not

Instead, most browsers will show the graphic as it would appear with index transparency, or worse, with no transparency and a matte color.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top