Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > How to generate a table so that the background color is grey on a printout

Reply
Thread Tools

How to generate a table so that the background color is grey on a printout

 
 
Stefan Mueller
Guest
Posts: n/a
 
      11-24-2005
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)?

Stefan


 
Reply With Quote
 
 
 
 
Barbara de Zoete
Guest
Posts: n/a
 
      11-24-2005
On Thu, 24 Nov 2005 17:05:06 +0100, Stefan Mueller
<(E-Mail Removed)> wrote:

> Is there any possibility to define the background of the table so that
> the background is also printed (only a light grey)?


There shouldn't be. You can suggest a grey background for the table in
your style sheet for printing, but it is up to the visitor/user whether or
not s/he wants the background colour actually printed. If so s/he will set
it in the browser preferences. If not, too bad.


--
,-- --<--@ -- PretLetters: 'woest wyf', met vele interesses: ----------.
| weblog | http://home.wanadoo.nl/b.de.zoete/_private/weblog.html |
| webontwerp | http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html |
|zweefvliegen | http://home.wanadoo.nl/b.de.zoete/html/vliegen.html |
`-------------------------------------------------- --<--@ ------------'
 
Reply With Quote
 
 
 
 
Dylan Parry
Guest
Posts: n/a
 
      11-24-2005
Pondering the eternal question of "Hobnobs or Rich Tea?", Stefan Mueller
finally proclaimed:

> background color of the table is not printed.


This is a browser setting that you can only change for your own machine,
so nothing you do will make the background print on other peoples'
printers unless you go round to their houses and reconfigure their
browsers

--
Dylan Parry
http://webpageworkshop.co.uk -- FREE Web tutorials and references

Usenet: The first post is free, but the next will cost you your soul.
 
Reply With Quote
 
Jim Higson
Guest
Posts: n/a
 
      11-24-2005
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.


 
Reply With Quote
 
wayne
Guest
Posts: n/a
 
      11-26-2005
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)?
>
> Stefan
>
>

Try this in your style sheet:

@media print {
td.style_tabletitle {
background-color: #ffffff !important;

}

--
Wayne
http://www.glenmeadows.com
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
box with text with grey background mouse@house.spam HTML 8 07-11-2006 06:07 PM
Too light grey color Ray HTML 3 10-31-2005 09:31 AM
Background pics, neutral grey stepwedges & WebClocks Donald Gray Digital Photography 0 06-25-2004 03:14 PM
Still trying to figure the grey level of an 18% grey card (was: If I shoot a grey card, should this end up as 127 grey?) Alan F Cross Digital Photography 40 03-02-2004 12:12 PM
If I shoot a grey card, should this end up as 127 grey? Alan F Cross Digital Photography 8 02-26-2004 09:57 AM



Advertisments