Jump to content

Div Transparencies - Opaque Text


cyber0ne

Recommended Posts

Using the sample code on http://www.w3schools.com/css/css_image_transparency.asp (Example 3 - Text in Transparent Box), I tried changing the color of the div to black and the color of the text to white, working on a kind of "glass" effect over a background image.However, I seem to be running into a problem where the text within the div gets the same transparency as the div itself. I tried adding the following to the style for "div.transbox p":

/* for IE */filter:alpha(opacity=100);/* CSS3 standard */opacity:1;/* for Mozilla */-moz-opacity:1;

But that doesn't seem to make a difference. Currently I'm testing in Opera and IE, and both seem to be applying the transparency to the text. Can anyone think of a way to keep the text fully opaque, so that white text doesn't end up being too dim? Any help would be much appreciated, thank you.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...