Friday, January 18, 2008

Hide parts of the page while printing

first of all create a css as follows

style type="text/css" media="print">
.NonPrintable
{
display: none;
}

/style>

then use class name to NonPrintable to the element which You don't want to print on the paper

In the print style sheet, you can also hide other elements like your menu, header, footer or whatever it is you don't want to be printed:

.NonPrintable, #Menu, #Footer
{
display: none;
}

For detail see this article