I'm sending HTML email with PHP and I set a table with shadow, stylized with box-shadow
, but it did not work ... Any help to set shadow in HTML email using a table?
I'm sending HTML email with PHP and I set a table with shadow, stylized with box-shadow
, but it did not work ... Any help to set shadow in HTML email using a table?
With this code you compatibility in ALL browsers.
table {
-moz-box-shadow: 3px 3px 5px 6px #ccc;
-webkit-box-shadow: 3px 3px 5px 6px #ccc;
box-shadow: 3px 3px 5px 6px #ccc;
}
<table>
<tr>
<th>Nome</th>
<th>Sobrenome</th>
<th>Idade</th>
<tr>
<tr>
<td>Leonardo</td>
<td>Bonetti</td>
<td>19</td>
<tr>
</table>
Many email clients (eg Gmail) ignore bold CSS as well as ignore imported external CSS code (.css) or inserted into <head>
.
Use CSS inline on elements with style . Ex:
<elemento style="..."></elemento>
And do not use codes, as I said, more bold ( box-shadow
would be one of them). Use more basic styles such as background
, color
, border
etc ... These are rendered normally.
Another general rule is to make HTML as simple as possible using Tables instead of DIVs.