Printer Stylesheet in Head

103 Views Asked by At

I have a print stylesheet setup but I need to override a few properties of the stylesheet on one page. The easiest way I could figure to do this is to just put the styles needed in the head of the page like this:

<style type="text/css">
  /* Print Styles */
</style>

But my problem is I do not know how to target just the printer.

Note: I do not want to create another stylesheet.

1

There are 1 best solutions below

1
On BEST ANSWER
@media print {
   .someclass {
        color: red; /*makes it red only when printing*/
   }
   /*more printer-only styles*/
}

For reference about other media types: little link.