0

I am looking for a javascript code to print my webpage. Then I found this one - javascript:window.print() and I used it as:

<span class = "printIt"><a href = "javascript:window.print()">PRINT</a></span>

It is functional. However, I found out that this code can't print the image displayed in my webpage. Only the html and css are printable. When I tried to use the usual way of printing and press ctrl+p both image and style (CSS) are not printable.

May you please tell me what's the problem with this?

thank you!

  • browser setting perhaps? which browser – Jaromanda X Jul 30 '16 at 07:24
  • I've tried it with IE 11, firefox and google chrome. But the output is still the same – user010594 Jul 30 '16 at 07:27
  • Show the HTML and the CSS of the image. Is it a background image? By default browsers don't print background images. – JJJ Jul 30 '16 at 07:27
  • yes it is, I set the CSS like this: #Image { width:1100px; height:160px; /* margin-left:6px;*/ margin-top:10px; background:url(../img/IwantToBeAMember/boracay_beach.jpg) no-repeat; border-radius:10px; } – user010594 Jul 30 '16 at 07:31

0 Answers0