Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Flygger19794yThe main reason the page break isn't working is in the display type on table rows, so setting that to `display: block` should do the trick.
As `page-break-*` properties have been deprecated you should probably include both properties for now. And then maybe just do the whole thing in CSS like this:
```
table tr {
display: block;
}
table tr:nth-child(2n) {
page-break-after: always;
break-after: page;
}
```
Related Rants
PAGE BREAK AFTER IS FUCKED UP. FML
ok guys, if you have any recommendation or alternative to page-break-after, please let me know. im desperately in need of a goddamn solution.
heres my problem, ive got a table, inside the table is the tbody, now i only want two rows to be displayed in each page (im doing html for pdf docs). so what ive been trying to do is adding <tr class="display:block;page-break-after: always !important"> whenever it meets the condition (rowCount%2!=0).
Ive been trying to figure this out for the last 12 fucking hours. cheesus fucking crust. ik this isnt stackoverflow but stack hasnt really been helpful as well :( FML
rant
page-break
css
html