The aim is to print table with colored td-s. I need a way correct for all types of browsers.
Is there any way?
The background color of the table is given by the bgcolor="color" attribute. When applied to the <table> tag, the color fills the background. Cell background colors are set by applying the bgcolor attribute to a <tr> tag (to color the row) or to a <td> tag (to color the cell).
The HTML <table> bgcolor Attribute is use to specify the background color of a table. Attribute Values: color_name: It sets the text color by using the color name. For example “red”.
First on the File menu, click Options > on the Display menu, click to select the Print background colors and images check box under Printing Options > and then click OK. Hope above suggestion helps you and good luck! Was this reply helpful?
For webkit browsers (Chrome and Safari):
body{ -webkit-print-color-adjust:exact; }
Quote from here: CSS @media print issues with background-color;
IF a user has "Print Background colours and images" turned off in their print settings, no CSS will override that, so always account for that. This is a default setting.
Once that is set so it will print background colours and images, what you have there will work.
It is found in different spots. In IE9beta it's found in Print->Page Options under Paper options
In FireFox it's in Page Setup -> [Format & Options] Tab under Options.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With