Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > How to add a page break to a HTML page

Reply
Thread Tools

How to add a page break to a HTML page

 
 
Stefan Mueller
Guest
Posts: n/a
 
      03-09-2006
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


 
Reply With Quote
 
 
 
 
Toby Inkster
Guest
Posts: n/a
 
      03-09-2006
Stefan Mueller wrote:

> 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/.../printing.html

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

 
Reply With Quote
 
 
 
 
Stefan Mueller
Guest
Posts: n/a
 
      03-10-2006
> HR {
> page-break-after: always;
> }


Works not bad.

Many thanks
Stefan


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
optionparse: how to add a line break to the help text Gelonida N Python 0 09-10-2011 08:43 PM
`if (!p ? i++ : 0) break;' == `if (!p){ i++; break;}' ? lovecreatesbea...@gmail.com C Programming 12 04-14-2008 07:59 AM
HTML Page Break Problem rehanbasar HTML 1 06-06-2007 04:04 PM
html file page break through browser. chunji08@gmail.com HTML 15 06-12-2006 10:32 AM
Insert a page break in HTML Danny Ni ASP .Net 1 11-18-2004 10:49 AM



Advertisments