Hi,
I am not sure if this is the place for me to post this question, but am trying my luck.
I try printing a html <Table> with a background color, but then it only prints the text within the table and not the background image. There is a setting in the IE, but then cant expect all the users to do this. Is there a way to do this?
Thanks
Printing tables with backgrounds
Moderator: General Moderators
Printing tables with backgrounds
No, none of the cells have a bg color. It actually is a setting in IE, Tools-> Internet Options - >Advanced -> Print bg color. But I dont expect all the users to make this setting. Is there anyway that this background img printing can happen by defualt?
Thanks
Thanks
You can use regular image to create background-color. It's easy if you only need one color for whole table and you know the dimensions and position of the table. Small example can be found at http://www.saunalahti.fi/jarzka/esimerk ... print.html
Develop a little further that idea and you can even color every other <tr>.
Develop a little further that idea and you can even color every other <tr>.
You could..
Wrap the table in a div with 0 padding.
Make the table Transparent with 0 margin
Create a style sheet for print.
Assign the div a background image in the print.css style sheet
Test it.
Wrap the table in a div with 0 padding.
Make the table Transparent with 0 margin
Create a style sheet for print.
Code: Select all
<link rel="stylesheet" type="text/css" href="print.css" media="print" />Test it.