views:

393

answers:

3

Is there any way to print out something like, when the user Prints out the page?

  <div id="test" style="background:#000000; color:#FFFFFF"> Black Stripe </div>

I'm trying to create a page with row striping in the printout the same way it appears on screen. When they go to print , it of course drops the background. Besides telling each user how to enable print backgrounds in their browser, is there a way programmatically via CSS/ HTML or Javscript to do this?

+4  A: 

Nope, that's completely dependent on the browser's settings that you can't change with JavaScript or CSS.

Tatu Ulmanen
A: 

Edit, misread the question. @media print {} seems not like an option here.

The only way is to have images behind your rows, javascript support while printing is a subject I cannot help much, as a rule I do not consider it.

F.Aquino
A: 

I haven't tried, but perhaps setting a style sheet for printers?

metrobalderas
No, this is not correct. Background colors/images is a per browser setting.
Doug Neiner