Print-friendly web pages: menus, guides and quotes on paper
Short answer: Add a print stylesheet: CSS inside @media print that hides navigation, banners and chat buttons, switches to plain black text on white, stops tables and cards from splitting across pages, and prints the address behind important links. Set paper margins with @page, then test in your browser's print preview. It takes an afternoon for the handful of pages people actually print, and it also makes "Save as PDF" produce a tidy document.
Plenty of people still print web pages. A café's menu goes on the staffroom fridge, a builder's quote gets printed for the bank, a vet's post-op care guide sits on the kitchen bench, and a tour operator's packing list goes in the bag. When those pages print with a cookie banner, a giant hero photo and the menu cut in half across two sheets, it reflects on the business.
Step 1: Decide which pages need it
Don't style everything. Start with pages people print or save:
- Menus and price lists
- Quotes, estimates and order confirmations
- Care, aftercare and instruction pages
- Event schedules, timetables and itineraries
- Recipes and how-to guides
Check your analytics for these URLs and ask front-of-house staff which pages customers bring in on paper.
Step 2: Add a print stylesheet
MDN's printing guide gives two ways: link a separate file with media="print" in the page head, or add an @media print { … } block at the end of your main stylesheet. Either way, the rules only apply when the page is printed or saved as PDF. MDN notes that normal specificity and precedence rules still apply, so print rules sometimes need to be as specific as the screen rules they override.
A starting point:
@media print {
header nav, .site-footer, .cookie-banner, .chat-widget, .newsletter-signup { display: none; }
body { color: #000; background: #fff; font-size: 12pt; }
a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 10pt; }
table, .menu-item, .quote-line, figure { break-inside: avoid; }
}
@page { margin: 15mm; }
Step 3: Work through the page, element by element
| Element | On screen | In print |
|---|---|---|
| Navigation, header menu | Full menu, hamburger icon | Hidden; keep logo and business name |
| Cookie banner, chat bubble, pop-ups | Floating over content | Hidden |
| Hero image | Full-width photo | Hidden or reduced, unless it's the content |
| Background colours and dark sections | Branded | Plain white with black text, saves ink |
| Links | Coloured, underlined | Text plus the URL in brackets for key links |
| Menu items, quote lines, tables | Cards or grids | Kept whole on one page |
| Buttons ("Book now", "Add to cart") | Prominent | Hidden, or replaced with a phone number or URL |
| Footer | Links, social icons | Short line with address, phone, website |
| Embedded maps and videos | Interactive | Hidden; address printed as text |
Show where links go
On paper, "click here" goes nowhere. MDN documents the attr() function, and using it in content on ::after adds the link's address after its text, as in the snippet above. Limit it to links that matter: external links, or links inside the main content, not every menu item.
Stop things splitting across pages
The break-inside property controls whether page breaks can happen inside a box. Setting break-inside: avoid on a menu item, a quote line or a table keeps it together. Don't apply it to huge containers, or you'll push whole sections onto the next page and leave big gaps.
Control the paper
The @page at-rule lets you set page margins and the page box size and orientation, and target subsets of pages with pseudo-classes such as :first. A small margin and A4 portrait suit most New Zealand printers; a landscape setting may suit a wide timetable.
Step 4: Test properly
- In Chrome DevTools, open the Rendering tab and set Emulate CSS media type to print, as described in Chrome's CSS emulation docs. You can then edit print styles live.
- Open the real print preview (Ctrl/Cmd + P) in Chrome, Safari and Firefox. Check page count, breaks and margins.
- Save as PDF and open it on a phone. Many people "print" to PDF and send it on.
- Print one physical copy of your most important page on an ordinary office printer, in black and white.
Troubleshooting
| Problem | Likely cause | Fix |
|---|---|---|
| Print styles ignored | Screen rules more specific | Increase specificity or put print rules last |
| Blank first page | A hidden element still taking space, or a forced break | Check for page-break-before/break-before on the first section |
| Menu cut in half | Grid item split across pages | break-inside: avoid on each item |
| Huge empty gaps | break-inside: avoid on large wrappers |
Apply it to smaller items only |
| Colours missing | Background colours may not print, depending on browser settings | Don't rely on background colour for meaning |
| Fixed header repeats or covers text | position: fixed in print |
Set it to static in the print block |
Step 5: Consider a "Print" or "Download PDF" button
A visible print button helps on menus and quotes. A plain window.print() call opens the browser's dialog, and MDN also notes that browsers fire beforeprint and afterprint events you can use to adjust the page around printing.
A separate PDF is still worth it when the document needs a fixed layout (a signed quote, a formal brochure). For anything that changes often, like menus and prices, print CSS keeps one source of truth: update the web page and the printout updates too.
A hypothetical before and after
Imagine a hypothetical Nelson café whose menu page prints across four pages, with the hero photo on page one and dessert split between pages three and four. After a print stylesheet, it prints on two pages: logo and opening hours at the top, sections kept whole, prices aligned, and the website and phone number in the footer line.
FAQ
Does a print stylesheet slow down my site?
No noticeable effect. It's a small amount of CSS, and when linked with media="print" it's only applied when printing.
Can I print a different version of the page?
You can show elements only in print, for example a short "Prices correct as of" note or a QR code back to the page, by hiding them on screen and showing them in the print block.
Will this work on phones?
Phones print and save as PDF through the same browser engines, so the same CSS applies. Test the PDF output on a phone anyway.
Do I need this if I already offer PDFs?
If the PDF and web page show the same thing, print CSS can retire the PDF and save you updating two versions.
For a menu, quote or guide page your customers keep printing badly, send us the link and we'll sort the print version.
Sources
- https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Media_queries/Printing
- https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@page
- https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/break-inside
- https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/attr
- https://developer.chrome.com/docs/devtools/rendering/emulate-css