Many printing problems can be resolved by considering the media attribute of the style definition. You can declare
<link rel="stylesheet" type="text/css" media="screen" href="..." />
to enable css only for screen only, use media="all" to determine what information will be displayed both on the screen and on the printer or to make html elements displayed only during printing. For example, with the jQuery user interface, you might find a good idea to print only the selected tab (or accordion). You may find it helpful not to print some hidden divs like div.loadingui . So you can make CSS like
<style type="text/css" media="screen"> #printableButNotVisible { display:none } </style> <style type="text/css" media="print"> #accordion h3, #vcol, div.loadingui, div.ui-tabs-hide, ul.ui-tabs-nav li, td.HeaderRight { display:none } #printableButNotVisible { display:block } </style>
This is just an example, but I hope to explain the main idea. In addition, you can dynamically create css and embed or switch to your html document (see http://docs.jquery.com/Tutorials//_Quick_jQuery_Tips#Switch_A_Stylesheet ).
It might be a good idea to remove the menu from the page while printing, but I cannot give you any example, because I do not know which menu you are using.
If someone knows good CSS for print media for jQuery UI and for jqGrid, this will be very interesting for me too.
source share