Advanced Search

Results 1 to 4 of 4

Thread: Print Help

  1. #1
    Join Date
    Feb 2005
    Posts
    54
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Print Help

    Hello all,

    I have an HTML page that is a large web form intended to be printed (approx. 5 pgs.). My question is this: Is there a way to insert break points in my HTML code that tell the printer to start printing a new page at this point - essentially a printer page break [similar to MS Word]?

    Please let me know if you need me to elaborate any further.

    Thanks,

    - I

  2. #2
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by johnnyi
    Is there a way to insert break points in my HTML code that tell the printer to start printing a new page at this point - essentially a printer page break [similar to MS Word]?
    You can using CSS, but not all browsers may have proper support for paged media (I think Opera's is the best).

    Mike

  3. #3
    Join Date
    Feb 2005
    Posts
    54
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I actually found the tag for this... all you need to do is insert the following tag anywhere where you want the new page to begin:

    Code:
    <div style="page-break-after:always"></div>

  4. #4
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by johnnyi
    I actually found the tag for this...
    There is no tag for this.

    Code:
    <div style="page-break-after:always"></div>
    That uses CSS, just as I wrote, and what I linked to. However, any page-break-* declaration should be included in a separate print style sheet. It should also be applied to an existing element, not stuffed into an artificial one.

    Mike

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •