How do you print one a hidden image and not the rest of the page?

98 views Asked by At

I'm working on a landing page and I have a call to action button that reads "print coupon". I've got the button working with print.window(). The issue is that on my local machine, it works perfect and then when it's on the server, I get a print fail.

    /* Print coupon */
@media print {
  .no-print {
     display: none;
  }
    .coupon {
        position: absolute;
        visibility: visible;
        width: 400px;
    }
}

Not really sure what's going on. I have the image hidden until it's time to print. The rest of the body is surrounded by .no-print class.

0

There are 0 answers