views:

561

answers:

2

I have a javascript backed 'print' button on my webpage where the user can print the webpage.

This works ok except the background color of various elements does not print.

Is there a method of printing a web page whereby the background color of the various elements will print?

+7  A: 

Printing the background is browser setting and not something you can control programatically through client side scripting.

Pervez Choudhury
+1 Just imagine people trying to print pages with dark background colors. So many $$$ in ink/toners just disappearing...
Arve Systad
A: 

Even if you could, you shouldn't. There's a reason browsers default to ignore the background when printing - ink is expensive!

Under the definition for "background": A position or area of relative inconspicuousness or unimportance.

Unimportance. It's not important enough to override the local user's decision to save money. If it needs to be printed, it's not really part of the background.

pyrochild