SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Pagebreaks?

  1. #1
    SitePoint Evangelist jimday1982's Avatar
    Join Date
    Sep 2002
    Location
    Atlanta, GA
    Posts
    562
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Pagebreaks?

    I saw somewhere that it was possible to include pagebreaks in a printed HTML file using CSS... I tried, the following, but it still prints on the same page - perhaps I'm missing something?

    HTML Code:
    <html>
      <head>
      <style type="text/css">
      .pagebreak{page-break-before: always}
      </style>
      <title>POs from DynaDirect.com | 12/13/2004 11:21:40 AM</title>
      </head>
      <body>
      8791220
      4643635
      4354354
      <span class="pagebreak"></span>
      5465464
      5654645
      5464565
      </body>
      </html>
    Jimmy Day
    Senior Systems Analyst
    Piedmont Healthcare Corporation

  2. #2
    Caveat surfer Buddy Bradley's Avatar
    Join Date
    May 2003
    Location
    Cambridge, UK
    Posts
    2,366
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try it in a block-level element? Or maybe it has to be in a media="print" stylesheet?

  3. #3
    SitePoint Evangelist jimday1982's Avatar
    Join Date
    Sep 2002
    Location
    Atlanta, GA
    Posts
    562
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Buddy Bradley
    Try it in a block-level element? Or maybe it has to be in a media="print" stylesheet?
    Cool, I did both and now it works - thanks.
    Jimmy Day
    Senior Systems Analyst
    Piedmont Healthcare Corporation


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
  •