How can I force browsers to print background images in CSS?

DisgruntledGoat picture DisgruntledGoat · Jul 12, 2011 · Viewed 162.1k times · Source

This question was asked before but the solution is not applicable in my case. I want to make sure certain background images are printed because they are integral to the page. (They are not images directly in the page because there are several of them being used as CSS sprites.)

Another solution on that same question suggests using list-style-image, which only works if you have a different image for every icon, no CSS sprites possible.

Aside from creating a separate page with the icons inline, is there another solution?

Answer

Marco Bettiolo picture Marco Bettiolo · Jan 16, 2014

With Chrome and Safari you can add the CSS style -webkit-print-color-adjust: exact; to the element to force print the background color and/or image