Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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;
  }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #div
ADD COMMENT
Topic
Name
7+4 =