简体   繁体   中英

(HTML Printing) Next <tr> after page-break wont start at top of page

I'm using tables with this report, and my problem is that when I use page-break at the bottom of a page to avoid the last row being cut off, the next elements starts at the middle of the next page.

Here is my code:

<tr>
    <td class="1"></td>
    <td class="2"></td>
    <td class="3"></td>
    <td class="4"></td>
</tr>
<tr style="page-break-after: always;"><td colspan="4"></td></tr>
<tr>
    <td class="1"></td>
    <td class="2"></td>
    <td class="3"></td>
    <td class="4"></td>
</tr>

please see screenshot:

i think you might be using loop to print your report,

always use <br> * <hr> * or page-break-after outside the loop..

inspect the element from browser, you will get the error msg if any, and you can solve them..

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM