Solved

page break in html document

Posted on 2002-05-02
6
167 Views
Last Modified: 2010-04-09
Is there any way to add a page break to an html document? We needed to have the address portion of an invoice printout appear on a new page of an invoice. (so basically can you somehow force a printing page break in html)? The solution only needs to work in IE 5.5 or 6. Any ideas?
0
Comment
Question by:xandrr
  • 3
  • 2
6 Comments
 
LVL 18

Accepted Solution

by:
bruno earned 50 total points
ID: 6987099
you can do this in CSS...

you could do something like that...


<p STYLE="page-break-before: always">test text in the paragraph</p>

http://www.blooberry.com/indexdot/css/properties/print/pbbefore.htm


or

<p STYLE="page-break-after: always">test text in the paragraph</p>

http://www.blooberry.com/indexdot/css/properties/print/pbafter.htm



I would probably do this

<p STYLE="page-break-after: always"></p>

and you should have a page break right after that P tag...


BRUNO
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 6987123
<style type="text/css">
P{page-break-after:always}
</style>

now add

<p>

and you will get a page break when printing.

CJ
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 6987124
*sigh* stupid chatbox, it takes my time away from me :-(

;-)
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 18

Expert Comment

by:bruno
ID: 6987129
>>*sigh* stupid chatbox, it takes my time away from me :-(


eh??
0
 

Author Comment

by:xandrr
ID: 6987140
GREAT! exactly what i needed.
0
 
LVL 18

Expert Comment

by:bruno
ID: 6987156
Glad I could help!  Thanks for the A.  :-)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now