Click to See Complete Forum and Search --> : how do I print without the background?


dkozari
06-10-2003, 07:25 AM
My boss wants users to be able to log into their website and be able to print off the information there. However the site has a very black background and when you press the print button on the browser it comes out as a black sheet of paper.

I was thinking that I could stick a print button on the pages that people would be interested in printing. I am aware of using window.print(), but is there some kind of javascript that will let me print WITHOUT the background image?

Thanks in advance.

dkozari

pyro
06-10-2003, 07:30 AM
Yep, with CSS you can: (http://www.w3.org/TR/REC-CSS2/media.html)

@media print {
background-color: white;
}

requestcode
06-10-2003, 07:31 AM
I think this should do the trick:
http://www.javascriptkit.com/dhtmltutors/cssmedia2.shtml

dkozari
06-10-2003, 08:02 AM
Works great. Thanks alot!!

dkozari