Preventing a div and its content from being printed

css, printing

Solution

A common method is to use a separate CSS for printing. You can have a css for all media and one for print:

<link rel="stylesheet"
   type="text/css"
   media="print" href="print.css" />

In the print.css just put the display:none on the div.

Davide

Problem

I have a print page, and I want to put a div with some instructions on how to print the page in it. I don't want this section to appear when they actually print the page. How would I achieve this using CSS or JavaScript?

Original source