I have a dynamic table in my web page that sometimes contains lots of rows. I know there are page-break-before
and page-break-after
CSS properties.
Where do I put them in my code in order to force page breaking if needed?
相关问题
- Views base64 encoded blob in HTML with PHP
- Is there a way to play audio on a mobile browser w
- HTML form is not sending $_POST values
- implementing html5 drag and drop photos with knock
- Adding a timeout to a render function in ReactJS
You can use the following:
Refer the W3C's CSS Print Profile specification for details.
And also refer the Salesforce developer forums.
this is working for me:
From this thread: avoid page break inside row of table
Here is an example:
Via css:
or directly on the element:
Unfortunately the examples above didn't work for me in Chrome.
I came up with the below solution where you can specify the max height in PXs of each page. This will then splits the table into separate tables when the rows equal that height.
You will also need the below in your stylesheet
If you know about how many you want on a page, you could always do this. It will start a new page after every 20th item.
I have looked around for a fix for this. I have a jquery mobile site that has a final print page and it combines dozens of pages. I tried all the fixes above but the only thing I could get to work is this: