Answers for "window.print a div"

0

window.print a div

@media print {
  body * {
    visibility: hidden;
  }
  #section-to-print, #section-to-print * {
    visibility: visible;
  }
  #section-to-print {
    position: absolute;
    left: 0;
    top: 0;
  }
}
Posted by: Guest on January-15-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language