SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Guru
    Join Date
    Jan 2005
    Location
    USA
    Posts
    633
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Css and printing

    Hello Friends

    I am having a tough time formatting my print job using CSS.

    my situation is like this:-

    I am producing a page dynamically using PHP from a mysql database.The data
    is displayed like this

    <table border ="1">
    then I loop through using PHP to display data below
    <tr><td>Heading 1</td><td>Heading 2</td><td>Heading 3</td></tr>
    <tr><td>data from DB relating to heading 1</td><td>data from DB relating to heading 2</td><td>data from DB relating to heading 3</td></tr>


    after all the data is displayed I close the table
    </table>

    My challenge is that I need to produce a printable report of this information as well but I need to make sure that the information produces page breaks on the printatble pages where necesary.So I am using

    page-break-before:
    page-break-after:
    page-break-inside:

    but the desired result is not beaing produced.Basically I need the following

    1.Each page must have a border, but at the moment only the first page on top and the last page at the bottom have a border , the rest only have the left and right borders of the table.

    2. I need to make sure that if there is not enough space at the bottom of the page then either the heading row or the data row will not print on that page but do a page break first.

    I have been trying with page-break but I don't know where to put it,


    Please guiide me.
    Didi

  2. #2
    SitePoint Evangelist
    Join Date
    Mar 2005
    Posts
    523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    HI

    Are u sure what u are using is valid CSS

  3. #3
    SitePoint Guru
    Join Date
    Jan 2005
    Location
    USA
    Posts
    633
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes it is...

    Can you use CSS in printing.

    I thought you could.

  4. #4
    SitePoint Guru
    Join Date
    Jan 2005
    Location
    USA
    Posts
    633
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Guys

    Can anyone tell me how we find out if there is space between the last text/table and the end of the page,is this possible in CSS


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
  •