Force browser to render webpage's Print stylesheet

In Chrome (version 78), you can force the browser to render the webpage's print stylesheet using Chrome DevTools by going to More Tools > Rendering

Open Chrome DevTools Rendering Settings

then selecting the Print option in the Emulate CSS Media dropdown

Emulate print media checkbox in Chrome DevTools


usually the print css has a media type of print. simply remove the media definition and use it in replace of the main style sheet

<link rel="stylesheet" type="text/css" media="print" href="print.css" />

change to

<link rel="stylesheet" type="text/css" media="all" href="print.css" />

Tags:

Html

Css

Browser