How to print tables?

  • # April 27, 2010 at 8:56 am

    Say you have a table containing rows enough to span two A4 pages. When I print in FF/Mac 3.6, IE7 & IE8 page two just comes out blank, the first page cutting the table off when there isn’t more space.

    The specification says it can not break when using:

    Code:
    table { page-break-inside: avoid; }

    But only Opera supports this feature. What to do?

    # December 3, 2015 at 2:18 pm

    5 years later and I still have the same problem.

    I tried:

    table, tr, td, th { page-break-inside: avoid; }
    

    I even tried:

    .noBreak{
    display: block;
    page-break-inside: avoid;
    }
    

    and

    <tr>
    <th><div class="noBreak">...</div></th>
    <td><div class="noBreak">...</div></td>
    </tr>
    

    That didn’t work. I tried wrapping every tr in a tbody tag.
    That didn’t work and it broke the zebra stripe.

    Surely someone has solved this problem somewhere…

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed