Forum Moderators: open

Message Too Old, No Replies

Printing the bgcolor in browsers

is it possible via HTML?

         

Ducati

3:31 pm on Jan 26, 2004 (gmt 0)

10+ Year Member



In other words...

I have a site that uses a purple bg. It also contains purple images. When I try to print this page in IE or Netscape, the background is defaulted to white and the purple images are printed. This creates a real choppy display.

Any ideas on how to fix this by using HTML?

Thanks.

DrDoc

4:12 pm on Jan 26, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You cannot "fix" it using HTML (or any other technique). It's a browser setting. If you wish the background to be printed, then you need to change your browser's print settings to allow the printing of backgrounds.

Just remember a few things:
• The same "problem" is present for anyone wishing to print the page
• Most people wouldn't want to waste ink on printing a background
• Many people don't even have a color printer

You need to supply a solution where you allow the page to be printed in black and white -- black text on white background. Look into print style sheets...

twist

4:28 pm on Jan 26, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Never tried it, and it probably wont work but you could try creating a css stylesheet designed for print and try adding a background color there. Would be curious to know if it worked.

<link rel="stylesheet" type="text/css" href="print.css" media="print" />

jomaxx

4:34 pm on Jan 26, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No offense intended, but is your goal to make the page impossible to print? Or are you maybe promoting an inkject cartridge affiliate program on the site?

Unless it's an extremely light purple, I think the better approach would be to work on the graphics so that they look acceptable when printed on white paper, not to mention when printed in monochrome.

DrDoc

4:42 pm on Jan 26, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



A print style sheet wouldn't help...

To emphasize what I said earlier: You cannot "fix" it using HTML (or any other technique). It's a browser setting. There's nothing to fix... It is intended to work that way.

Ducati

6:17 pm on Jan 30, 2004 (gmt 0)

10+ Year Member



Thanks for the replies.

The idea is for the end-user to be able to print the page if they so desire.

I like the idea of creating a "printable version" that allows the user to print a black and white version of the page.

I wish we didn't have to use the purple background but the customer's always right ;-)