1

This is my code in css

background-image: url(${imgTitle});
background-size: 100% 30px;
padding-left: 10px;
margin: 10px;

How to make it work?

@media print{...}

or

Code.css
  • 1
    `@media print{...}` – Sinto Sep 12 '18 at 12:33
  • I don't think your server-side code is processed on the print. Thoughts? Try hard-coding a URL -- does it work then? – Glenn Ferrie Sep 12 '18 at 12:34
  • It's a browser setting - most browsers default to not print backgrounds to save on ink. The only way to be sure an image will print is to not have it in the background - you cannot force browsers to print the background using code (although you could try the non standard css in the duplicate answers - I wouldn't recommend putting that into production though) – Pete Sep 12 '18 at 12:36
  • Oh I got it! Thank you very much – Hemorny Style Sep 12 '18 at 12:43

0 Answers0