How to add a page break to a HTML page

S

Stefan Mueller

According to the data in a MySQL database I'd like to generate a HTML page
by PHP. The HTML page lists several invoices.

For example:
Invoice - Robert Miller
...
...

Invoice - John Meyer
...
...

Now I'd like to add a page break between each invoice so that I get one
invoice per page if I print the HTML page on a printer.

How can I do that?
Stefan
 
T

Toby Inkster

Stefan said:
Now I'd like to add a page break between each invoice so that I get one
invoice per page if I print the HTML page on a printer.

Invoice 1
<hr>
Invoice 2
<hr>
Invoice 3

with CSS:

HR {
page-break-after: always;
}

For the most part, CSS print-specific stuff is fairly badly supported by
most browsers (except Opera, which has excellent CSS support), however,
page-break-after and page-break-before are fairly widely supported.

http://www.westciv.com/style_master/academy/browser_support/printing.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top