Discuss How do i insert a page break in to my webpage in the HTML Programming forum on Dev Shed. How do i insert a page break in to my webpage HTML Programming forum covering discussions of HTML and XHTML, as well as HTML-related issues such as writing W3C Compliant code. Use HyperText Markup Language for building websites.
Receive the tools necessary to be the rock star of your field. Our 12-month program teaches you the evolving world of multi-channel marketing as well as the complex issues and opportunities found in the industry.
ASP Free and Iron Speed Designer are giving away $5,500+ in FREE licenses. Iron Speed's RAD CASE toolset can save up to 80% of your coding time. One free license per week, one perpetual license per month! Download and Activate to enter!
Web development can be a daunting task, even for specialists. There is a lot of information to absorb and a lot of technologies to learn in order to manage a superior website. When trying to learn the ropes, developers need a reliable source to introduce new ideas that can be easily implemented. When working on large projects, even web veterans may run into a technology or an aspect of a technology that they are unfamiliar with.
Posts: 540
Time spent in forums: 6 Days 15 h 18 m 36 sec
Reputation Power: 7
How do i insert a page break in to my webpage
I wish to break up the page for printing purposes, i have three or 4 parts on my page and without having to add a lot of blank lines I wish to allow them to click the print button and have it print each section on a seperate page.
Posts: 479
Time spent in forums: 1 Week 2 Days 23 h 50 m 34 sec
Reputation Power: 94
The simplest approach would be to put the separate parts within iframes. So when your users see the print dialog they can choose to print the current frame. (FireFox has an obtain to print 'Each frame separately'.)
You would need to split your, say, four sections into four separate .html pages. Then on the main page insert (and size and position) your iframes and set the src for each of them to one of your four new pages.
Posts: 479
Time spent in forums: 1 Week 2 Days 23 h 50 m 34 sec
Reputation Power: 94
Quote:
CSS has a page break property:
http://www.javascriptkit.com/dhtmlt...pagebreak.shtml
E-Oreo: Thank you, I had forgotten about this. (When I first studied css a few years ago it wasn't well supported.)
When you recommend PDF do you mean - provide a link to a separate pdf document? I know it's possible for JavaScript to create a pdf, but it's not the simplest thing to take on.
Posts: 6,457
Time spent in forums: 1 Month 2 Weeks 4 Days 2 h 12 m 3 sec
Reputation Power: 6144
Quote:
Originally Posted by AndrewSW
When you recommend PDF do you mean - provide a link to a separate pdf document? I know it's possible for JavaScript to create a pdf, but it's not the simplest thing to take on.
Yes, a link to a PDF document. It's not possible to generate a dynamic PDF document with client side JavaScript, but you can do it with a server side language.
Posts: 46
Time spent in forums: 2 h 51 m 59 sec
Warnings Level: 10
Number of bans: 2
Reputation Power: 1
thanks to cascading style sheets, it is possible to give modern web browsers a "hint" to help them put page breaks in the right places when printing out web pages. Here is an example:
<p style="page-break-before: always">
This will force a page break when printing, before the start of this particular <p> element.