Posted By

duzenz on 02/05/12


Tagged

css html page print web media area printable html5


Versions (?)

Show only non-printable area on web page but print only the printable areas


 / Published in: CSS
 

Show only non-printable area on web page but print only the printable areas

  1. <html>
  2. <head>
  3. <style type="text/css">
  4. #printable { display: none; }
  5. @media print
  6. {
  7. #non-printable { display: none; }
  8. #printable { display: block; }
  9. }
  10. </style>
  11. </head>
  12. <body>
  13. <div id="non-printable">
  14. non printable area
  15. </div>
  16. <div id="printable">
  17. printable area
  18. </div>
  19. </body>
  20. </html>

Report this snippet  

You need to login to post a comment.