View Full Version : Table Background Opacity with Text

01-19-2004, 02:39 PM
Hello All,

I have a table that I want to have a colored background. I want the backround to have some opacity to it. I will have text within the cells.

The problem I am having is that I am able to control the opacity of the background but that also makes the cell text fade too.

Is there a way to keep the text from being affected by the opacity setting?

<table width="400" height="300" border="0" bgcolor="#000080"style="-moz-opacity:40%; filter: alpha(opacity=40);">
<td><b>Test Text</b></td>


01-19-2004, 04:11 PM
Hi there NYColt.

Obviously the opacity will affect everything
within the cell. To get round this hurdle try this...

<td style="width:400px;height:300px;background-color:#000080;-moz-opacity:40%; filter: alpha(opacity=40);"></td>

<span style="position:absolute;top:150px;left:150px;"><b>Test Text</b></span>


01-19-2004, 05:21 PM
Gottcha, basically place the text over the table. hmm didn't think of that.