SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    Feb 2005
    Posts
    153
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Page break for every row when printing a table

    This is for an internal website, basically a database of products and I want to print 1 product per page from a table.

    What css code would make a new page after every row?

  2. #2
    SitePoint Enthusiast adityamenon90's Avatar
    Join Date
    Apr 2010
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Check this out:
    Specifying page breaks for printing using CSS

    Basically, that article suggests:
    Code:
    <style>
     div.product{page-break-after:always;}
    </style>
    <body>
        <div class="product">
            Product 1 Data
        </div>
        <div class="product">
            Product 2 Data
        </div>
        <div class="product">
            Product 3 Data
        </div>
    .
    .
    .
    .
    .
    </body>

  3. #3
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,810
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Depending on which browseer you are using you may need to use inline CSS for it to work.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  4. #4
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,888
    Mentioned
    122 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by felgall View Post
    Depending on which browseer you are using you may need to use inline CSS for it to work.
    Really? I've not picked that bug up. Which browsers don't do what they're supposed to do?


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
  •