web analytics
How to add page breaks to a printer-friendly web page Options
codeling
Posted: Thursday, October 13, 2016 8:48:35 AM

Rank:Advanced Member
Groups: Member
Joined: 12/11/2015
Posts: 784
Points: 3288

Starting with the release of Cascading Style Sheets 2 specification, you can finally suggest to browsers when to break pages when printing your web pages.

To suggest a page break, add <P style="page-break-before: always"> before the beginning of a new printed page. For example, if you place the following tags on a HTML page and print it using a compatible browser, you will end-up with three pages with the sample text.

<html>
<body>

This is the text for page #1.

<p style="page-break-before: always">

Page #2...

<p style="page-break-before: always">

Page #3...

</body>
</html>

The following figure shows the three printable pages in the Print Preview.

Sponsor
Posted: Thursday, October 13, 2016 8:48:35 AM
 
Users browsing this topic
Guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.


© 2017 Digcode.com. All rights reserved.