Log in

View Full Version : print css / background images



gpigate
04-23-2009, 04:10 PM
Well I thought I had been learning and doing the right things.... not so sure any more. I have a customer who is happy with site and functionality but asked why when he printed a form, that the labels did not show up.

Well I went css/div and the labels are all background images.

So I started googling and found that both IE and FF can be turned on to print them, but then it prints the entire page/site. I even read some of the old threads on here that seem to be related.

I thought ok, I will write a print window that cuts out the header/footer and any other unnecessary colors/images/buttons and just shows the form and those images. Then I think I am back to the same ball park of having div/background print problems

How SHOULD I go about allowing the labels to be seen and printed? I am not a css expert. I saw where there is a different type/media option for print but do not know if that will solve my problem. I am ok with writing a separate print css but wont I run into the same issue?

Unfortunately I cant show you the site/code because it is protected.... and there is a non disclosure. I have attached a screen shot with the labels blurred out.

Any ideas? direction? Thanks for the help in advance.

Snookerman
04-23-2009, 04:34 PM
Check out this awesome tutorial: http://css-tricks.com/video-screencasts/52-building-a-print-stylesheet/ (http://css-tricks.com/video-screencasts/52-building-a-print-stylesheet/)

Good luck!

jscheuer1
04-23-2009, 08:25 PM
Also, due to the print behavior - entirely under the control of the user's browser - to choose not to print background images, important information like labels should be foreground text.

gpigate
04-27-2009, 02:44 PM
awesome tutorial but not really where i Needed to go. however now I know what to do with some other things I am working on.

I just wrote a separate page without the images and dressed up differently and cleaner for the printer.

thanks for the info though