Friday, November 30, 2012

Print specific div in a Page


To Print specific div in a Page you can hack the print with the following code.

<style media="print" type="text/css">
@media print
{
body * { visibility: hidden; }
#PrintDiv * { visibility: visible; }
#PrintDiv { position: absolute; top: 0; left: 0; }
}
</style>

Or you can place that in print.css and include in your jsp

it will print specific div.

4 comments: