Last active
February 1, 2025 15:33
-
-
Save aron-hoogeveen/65c0599eff000465430cf51f04869a40 to your computer and use it in GitHub Desktop.
Example html page breaks for printing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <head> | |
| <style> | |
| @media print { | |
| .page, .page-break { | |
| break-after:page | |
| } | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <div class="page"> | |
| <p>This is on a different page (try CTRL+P)...</p> | |
| </div> | |
| <div class="page"> | |
| <p>...then this.</p> | |
| </div> | |
| <div> | |
| <p>You could also insert a breaker div...</p> | |
| </div> | |
| <div class="page-break"></div> | |
| <div> | |
| <p>...like this.</p> | |
| </div> | |
| </body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment