Leave td with transparent background

0

How do I leave a 'td' with transparent bgcolor without using STYLE?

I can only use bgcolor in the part, not to cause errors !! many browsers do not render the style.

As email marketing I can not use style sheet, I have to apply all inline css, do you know any way to insert the effect of transparency inline?

 <tr>
            <td width="246" height="200" align="center">
               <a href="#" target="_blank">
               <img src="images\foto.jpg" width="200" height="200" border="0" /></a>
            </td>
 </tr>
    
asked by anonymous 04.04.2014 / 16:05

3 answers

1

Apply background-color to a style attribute:

<td style="background-color: rgba(123, 123, 123, 0.5)">

The value 0.5 is the amount of transparency you want to put in the color. It varies between 0 (fully transparent) and 1 (no transparency). The other values are the amount of R (red), G (green) and B (blue), ranging from 0 to 255.

I ran a test using the bgcolor attribute, but apparently it only works with the rgb() function (does not work with rgba() ).

HTML code:

<div style="background-color: blue">
    <table style="background-color: rgba(123,123,123,0.7)">
        <tr>
            <td>asdasda</td>
        </tr>
    </table>

    adasdasd
</div>

Example in jsFiddle: link

    
04.04.2014 / 16:14
1

If I understand the question correctly, you can use background-color:rgba(); , example:

<table style="background:#666;">
<thead>
    <tr>
        <th>Coluna 1</th>
        <th>Coluna 2</th>
        <th>Coluna 3</th>
    </tr>
</thead>
<tbody>
    <tr style="background:blue;">
        <td>dado</td>
        <td style="background-color:rgba(102,102,102,1);">dado</td>
        <td>dado</td>
    </tr>
    <tr>
        <td>dado</td>
        <td>dado</td>
        <td>dado</td>
    </tr>
    <tr>
        <td>dado</td>
        <td>dado</td>
        <td>dado</td>
    </tr>
</tbody>

See example online: JSFiddle

    
04.04.2014 / 16:16
0

opacity: 0.4; filter: alpha (opacity = 40);

<table style="background-image:url('images_teste/1.jpg');opacity:0.4;filter:alpha(opacity=40);">
      <tr>
        <td>2</td>
        <td>&nbsp;</td>
      </tr>
    </table>

For IE8 I put the tag filter:alpha(opacity=40); Basically the CSS inline and with external code is equal, you put everything in line, separating by; "semicolon"

source: link

    
04.04.2014 / 16:17