What is CSS Print Styles Generator?
A print stylesheet is CSS inside @media print that styles the page when someone prints or saves as PDF. It should hide navigation, sidebars, and footers, show full URLs after links, prevent page breaks inside important blocks like tables and code, and set sensible margins. This is especially useful for documentation, recipes, invoices, and articles.
quickAnswer
Generate a @media print block that hides navigation, shows link URLs, controls page breaks, and sets sensible print margins. Essential for making articles, recipes, documentation, and invoices print cleanly.
Last updated: 2026-06-11
limitations
- Page-break rules such as page-break-inside: avoid are hints to the browser print engine, not guarantees. The engine may still break content if the block does not fit on one page.
- Browser print engines render CSS differently. Chrome, Firefox, and Safari each produce slightly different printed output, especially with background colors, page margins, and multi-column layouts.
- Print style rules only apply when the page is printed or viewed in print preview. Changes made in the browser DevTools with screen media enabled will not show print style effects. Always test print styles in print preview or by selecting the print media type in the DevTools Rendering panel.
Sources:MDN Web Docs · W3C Specifications · jquery.app on GitHub
How to use this tool
- Select the elements you want to hide when printing.
- Choose whether to show URLs after links.
- Set margin and page size preferences.
- Copy the @media print block into your stylesheet and test with print preview.
What you can use it for
- Prepare a recipe page for clean printing without navigation and ads.
- Make documentation pages print with full link URLs for reference.
- Style invoices and checklists for professional printed output.