← All Tools

Print Stylesheet Generator

Most websites print poorly because nobody bothers writing a @media print stylesheet. Pick the elements to hide, choose your paper size and margins, and decide whether links should expand into footnoted URLs — this tool generates the CSS, then renders a sandboxed preview using your live rules.

Page setup

Single value, or up to four (top right bottom left). Examples: 1in, 1cm 2cm.
Use pt sizing for print — pixels are display-relative.

Selectors

Behavior

Generated CSS


  

Live preview

The preview below shows a sample article. Toggle "preview as print" to render with your generated rules applied.

Tips

The modern way to handle page breaks is break-before / break-after / break-inside; the legacy page-break-* properties are still emitted for older browsers. The @page at-rule controls the printable canvas itself — size, margins, marks. Note that some printer drivers ignore @page margins in favor of the user's print dialog setting. To force the browser to print background colors and images, use print-color-adjust: exact (Chromium also supports the legacy -webkit-print-color-adjust). When in doubt, test in a real preview — printer rendering varies more than screen.