CSS for printing a div:
html body *{
display:none;
}
#printBillDIv , #printBillDIv *
{
display:block !important;
}
Emulation /Debugging
- Open the Developer tools (CTRL+SHIFT+I or F12)
- Click the Toggle device mode button in the left top corner (1).
- Make sure the drawer is shown by clicking the Show drawer button (2) or pressing the ESC key to toggle the drawer.
- Source: http://stackoverflow.com/questions/9540990/using-chromes-element-inspector-in-print-preview-mode
No comments:
Post a Comment