Search This Blog

Sunday 16 August 2015

Print Stylesheet Emulation/Debugging in Chrome


CSS for printing a div:

html body *{
display:none;
}
#printBillDIv , #printBillDIv  *
{
display:block !important;
}

Emulation /Debugging


  • Under Emulation > Media check CSS media and select print (3).Emulate print media query on Chrome v43

    • 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