Skip to content
Web Design & Development

Print Stylesheets: What Actually Works

CSS rules applied when a page is printed or saved as PDF, which hide navigation and adjust layout so the content prints cleanly.

Marcus Adeyemi Technical Director 2 min read 20 views
Print Stylesheets: What Actually Works

What is at stake

Recipes, invoices, instructions and legal pages are still printed, and without print styles they waste paper and cut off content.

The playbook

  1. Hide navigation, ads and interactive elements in print
  2. Use readable fonts and black text for printing
  3. Avoid breaks inside tables and figures
  4. Show link URLs where they matter
  5. Test print preview on key templates

Where it goes wrong

Avoid:

  • Printing dark backgrounds
  • Cutting tables across pages
  • Printing cookie banners and chat widgets
  • Hiding content users need in print
What to do and what to avoid with print stylesheets, side by side
Good practice against the usual mistakes, from the sources listed below.

The numbers behind it

Published figures for Print Stylesheets
MeasureFigure
Media query@media print
Page settingsthe @page rule controls margins and size
Page breaksbreak-before, break-after and break-inside
LinksURLs can be shown after link text with generated content

Getting outside help

When to hand it over: Bring in help when customers print invoices, recipes or instructions from your site.

Where this comes from

The figures and practices above come from the sources listed.

Working on something like this?

We take on Web Design & Development work for teams who want it done once, properly. Tell us what you are building and we will tell you honestly whether we are the right studio for it. Start a project.

Where to go next

Spotted something wrong? Report an error on this page. We correct on the page and say what changed.

All services

The work behind this article, and what it costs.

Marcus Adeyemi

Builds and maintains the web work. Writes about front-end architecture, performance, accessibility and the unglamorous parts of keeping a site alive.

Keep reading

More in Web Design & Development