page-break-inside

CSS to stop page break inside of table row

点点圈 提交于 2019-12-24 06:27:42
问题 I am trying to avoid having page breaks inside of rows for my HTML tables that may go past one page. I am using Internet Explorer Print Preview and also BCL EasyPDFSDK to convert to PDF to test this. I applied the following CSS styling in various combinations to the <td> elements but for each one I was getting an undesired result: td { page-break-inside: avoid !important; white-space: nowrap; overflow: hidden; margin: 4px 0 4px 0; } I believe the page-break-inside: avoid !important is working

CSS to stop page break inside of table row

本秂侑毒 提交于 2019-12-24 06:26:12
问题 I am trying to avoid having page breaks inside of rows for my HTML tables that may go past one page. I am using Internet Explorer Print Preview and also BCL EasyPDFSDK to convert to PDF to test this. I applied the following CSS styling in various combinations to the <td> elements but for each one I was getting an undesired result: td { page-break-inside: avoid !important; white-space: nowrap; overflow: hidden; margin: 4px 0 4px 0; } I believe the page-break-inside: avoid !important is working

How to apply some styles to first and last elements on a print page?

人盡茶涼 提交于 2019-12-23 09:29:24
问题 I have the following dummy code: <!doctype html> <html> <head> <style> p {font-size: 20px;} </style> </head> <body> <script type="text/javascript"> window.onload = function () { var body = document.getElementsByTagName('body')[0], p = document.createElement('p'), el; p.style.height = '20px'; p.innerText = 'Some Test'; for (var i = 0, len=30; i<len; i++) { el = p.cloneNode(true); body.appendChild(el); } }; </script> </body> </html> It's render some elements and on page preview it looks like

Keep contents of a div together for printing in IE8

泄露秘密 提交于 2019-12-22 05:11:49
问题 Given the following HTML document, I need to keep the "Table title" line on the same page as the <table> when being printed in IE8. Despite the page-break-inside:avoid; , there is still a page break between the title and the table. My understanding of this suggests a page break should be avoided and the whole div pushed on to page 2. The doctype is XHTML 1.0 Transitional, I have <meta http-equiv="X-UA-Compatible" content="IE=8" /> set to force IE8 into Standards Mode which supposedly supports

Page-Break-inside property is not working in chrome

时光毁灭记忆、已成空白 提交于 2019-12-19 17:34:44
问题 I have a long table data, which having many of the rows and nested tables. When I am printing this data then the rows of the table and nested tables are just break on the page break, means tables and data are split into pages, So I use following CSS property there:- table tr { page-break-inside:avoid; position:relative; } But this is not working in my case, you can see the live demo here:--http://jsfiddle.net/npsingh/S8vr8/2/show/ Please edit the code by following link:-- http://jsfiddle.net

What is the correct way to do the CSS to avoid page breaks?

三世轮回 提交于 2019-12-12 03:37:26
问题 I’m trying to use wkhtmltopdf to turn this page into a (somewhat) nice-looking PDF document: http://z2codes.franklinlegal.net/franklin/DocViewer.jsp?showset=lubbockset&z2collection=lubbock&docid=405#405 I’m using the following code so far: a[name^="0"] p, a[name^="1"] p, a[name^="2"] p, a[name^="3"] p, a[name^="4"] p, a[name^="5"] p, a[name^="6"] p, a[name^="7"] p, a[name^="8"] p, a[name^="9"] p { display: block; page-break-inside: avoid; } a[name^="0"], a[name^="1"], a[name^="2"], a[name^="3

page-break-inside being ignored

本秂侑毒 提交于 2019-12-11 05:58:32
问题 I am dynamically adding HTML from another page and styling it for print. However, page-break-inside: avoid; , when applied to my elements (any of them), does not seem to be taken into account when printing even though it shows up in the styles. I am using Chrome 31 on Windows Here is a jsFiddle of the simplified version of my program ( WARNING : It brings up the print preview after 3 seconds. To stop this simply comment out the setInterval at the bottom), This is the version where page-break

Page-break-inside support in phantomjs on heroku

自作多情 提交于 2019-12-08 02:21:42
问题 I have a NodeJS app using PhantomJS to generate PDF files. My app is deployed to Heroku and I'm using this phantom build pack. Unfortunately this build pack does not support the page-break-inside: avoid CSS property. I did a research and found 2 hacks on this GitHub issue page. I've tried both of them, but unfortunately I can't use the CSS one, due to my page structure and the JavaScript one isn't page-breaking properly. One of the guys in the GitHub link above mentioned that this problem is

Page-break-inside support in phantomjs on heroku

[亡魂溺海] 提交于 2019-12-06 04:21:10
I have a NodeJS app using PhantomJS to generate PDF files. My app is deployed to Heroku and I'm using this phantom build pack. Unfortunately this build pack does not support the page-break-inside: avoid CSS property. I did a research and found 2 hacks on this GitHub issue page. I've tried both of them, but unfortunately I can't use the CSS one, due to my page structure and the JavaScript one isn't page-breaking properly. One of the guys in the GitHub link above mentioned that this problem is fixed if I compile from source, but I have no idea how I can compile from source on Heroku App and is

Keep contents of a div together for printing in IE8

。_饼干妹妹 提交于 2019-12-05 04:52:01
Given the following HTML document, I need to keep the "Table title" line on the same page as the <table> when being printed in IE8. Despite the page-break-inside:avoid; , there is still a page break between the title and the table. My understanding of this suggests a page break should be avoided and the whole div pushed on to page 2. The doctype is XHTML 1.0 Transitional, I have <meta http-equiv="X-UA-Compatible" content="IE=8" /> set to force IE8 into Standards Mode which supposedly supports this syntax , and I have verified the rendering is being done in standards mode by checking document