Alan Alan - 1 year ago 62
HTML Question

Is there a way I can hide a DIV when I am doing a print of my page with CSS?

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?

Answer Source

try to hide/show them via @media blocks:

inside css:

@media print {
  #heading {
    display: none !important;
@media screen {
    display: none !important;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download