Split an HTML page so that the printer breaks it into separate pages

I am planning a price list for customers online, and I was thinking of a simple, very long page or div container with some anchor links to help navigate to different products.

However, if someone wants to print only the price list with certain products, I do not want all pages to print, but only the current one. Is there any printable character or tag?

Just in case, someone has a better idea, all I want to achieve is to have a price list in html to change it in one place, but still be able to convert individual price lists of products to PDF files for Emailing specific products.

+4
source share
1 answer

Use this CSS:

@media print { .page-break { display:block; page-break-before:always; } } 

and then specify this in your HTML where you want the page to break:

 <div class="page-break"></div> 

And there you go :)

+9
source

All Articles