Hide header and footer when printing - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Footer

Description

Hide header and footer when printing

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <style type="text/css" media="screen">
#screen {}<!--from w  w w.j av  a  2s  .  co m-->
#print {
   display:none;
}
</style> 
  <style type="text/css" media="print">
#screen {
   display:none;
}
</style> 
 </head> 
 <body> 
  <div id="screen">
    Lorem ipsum dolor sit amet, cons 
  </div> 
  <div id="print">
    Lorem ipsum dolor sit amet, consectetur ad 
  </div>  
 </body>
</html>

Related Tutorials