Posted by Jim Higson on 11/24/05 18:48
Stefan Mueller wrote:
> I'd like to generate with PHP a HTML email which contains a table.
> The backgound color of the table is grey. But if you print the email or
> HTML page on a printer the background color of the table is not printed.
>
> td.style_tabletitle {
> font-family: verdana;
> font-size: 8pt;
> font-weight: bold;
> color: #000000;
> background-color: #666666;
> }
>
> <td width = "100%" class = "style_tabletitle">
> My table title
> </td>
>
> Is there any possibility to define the background of the table so that the
> background is also printed (only a light grey)?
Nope. In theory you can do this with CSS media selectors, but a lot of email
clients (webmail ones especially) don't use CSS very well.
See:
http://www.alistapart.com/articles/cssemail/
The user's email client might strip the background out anyway, but probably
can't be relied on. Better to use print friendly colours to start with or
just send plain text emails.
[Back to original message]
|