[英]How can I avoid table to break in print preview?
I know there are many questions and many answers for this. 我知道有很多问题和答案。 Everyone has different problems with different solutions for different browsers.
每个人对于不同的浏览器都有不同的解决方案。 I have tried many solutions from the below URLs.
我已经尝试了以下网址提供的许多解决方案。 But nothing seems to work.
但是似乎没有任何作用。
My output is as follows : 我的输出如下:
How can I avoid this kind of situation?
我如何避免这种情况? I don't want to mess up the table structure.
我不想弄乱表结构。 This table data are filled up dynamically using handlebars.js.
该表数据是使用handlebars.js动态填充的。
Links I have followed: Link-1 Link-2 Link-3 我关注的链接 : 链接1 链接2 链接3
.page-break
is a div class which I have added after each section and that is working fine. .page-break
是我在每个部分之后添加的div类,并且工作正常。
.Acc_Table
is a table class which is shown in output image starting from SEARS/CBSD row and ending with payment history row. .Acc_Table
是一个表类,在输出图像中显示,从SEARS / CBSD行开始,到付款历史记录行结束。
How can I solve this? 我该如何解决?
Is it possible to close the table before the page break, put in the page break, and reopen the table after the page break? 是否可以在分页符之前关闭表,放入分页符,然后在分页符之后重新打开表? Or what I wish to display the table on the next page only if it's breaking?
还是我希望仅在表格中断时才在下一页显示该表格? How can I achieve that?
我该如何实现?
have you checked if the table or if there is a div that is wrapped around it has the display: inline-block;
您是否检查过该表或是否有环绕它的div
display: inline-block;
or display: inline;
或
display: inline;
CSS property? CSS属性? I found out that while I was debugging some code for a printing problem that if the table is inline you get this effect.
我发现,当我调试一些代码来解决打印问题时,如果该表是内联的,则会获得这种效果。 Try to put
display: block
or display: static
, that works for me 尝试将
display: block
或display: static
,对我有用
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.