tags:

views:

38

answers:

2

Hi friends i have a problem in that i set a img as a background to a table , see below

     <table id ='outertable' style="background: url(courierimages/biglogo.jpg) no-repeat center;opacity:0.2;filter:alpha(opacity=20);">
 <tr>
  <td>
             <table id = 'innertable'>
  <tr>
        <td><input type = "text"></td>
                       </tr>
      </table>
 </td>
 </tr>
</table>

Here the opacity applies to the inner table too. But i need it for outertable only.Please guide on this , Thanks in advance.

A: 

Explicitly set a background-color on your inner table using css eg. add following to your stylesheet

#innertable background-color:#fff
Dan Diplo
+2  A: 

The opacity applied on parent element will be always inherited by it's children.

There are some hacks that works with IE, but it's not a good solution...

Timothée Martin