-1

I would like to print my page without headings.

Is there a way I can:

  • make the heading <DIV id="heading"> not show when I am doing a print

  • and make a <DIV id="summary"> show only when doing a print?

Alan2
  • 23,493
  • 79
  • 256
  • 450

3 Answers3

2
@media print { 
 #heading{
  display:none;
 }
 #summary{
  display:block;
 }
}
1

try to hide/show them via @media blocks:

inside css:

@media print {
  #heading {
    display: none !important;
  }
}
@media screen {
  #summary{
    display: none !important;
  }
}
norganos
  • 141
  • 1
  • 8
-2

.heading{display:none;}

means setting the display property to none ..will hide the element

vishal tewatia
  • 103
  • 1
  • 7