views:

1659

answers:

2

I want each row of a table to be printed (media="print", not "screen") on separate page. So my HTML looks like this:

<table>
    <tr style="page-break-after: always;">
     <td><p>Page 1</p></td>
    </tr>
    <tr style="page-break-after: always;">
     <td><p>Page 2</p></td>
    </tr> 
</table>

The page break works in Firefox and IE but not in Safari 4 nor Opera.

I tried adding the "page-break-after: always" to <td> and <p> but neither works. I can't seem to find a way to force a page break within a table in Safari and Opera.

Any idea on how to make it work in all Browsers?

+1  A: 

Hate to only half answer your question, but...

In Opera, this will work with elements that are block elements (a table row is a table-row display type). As page-break-after applies only to those elements. I'm not sure how to make it work in Safari.

style="display:block;page-break-after: always;"
Hexxagonal
Thanks, but that doesn't work for Safari. -_-
Highwind
Yeah, I think you are out of luck. It looks like it might be a Safari bug that doesn't let you do it in tables.
Hexxagonal
A: 

How do i put page breaks in safari, can i do this by putting the parts i want to print on a seperate page in a new table??