Hide section of html for print

A simple tip to hide a section of html content when printing the page. Can also you a css file to define the print content

@media print was introduced in CSS2 to support media types. When using the @media screen make sure not to include media type in stylesheet link.

Working sample here

<link rel="stylesheet" href="print.css" type="text/css" media="print" />
@media print {
       #hide_content {
          display: none;

Leave a Reply

Your email address will not be published. Required fields are marked *