[英]CSS page-break not working
I am using "page-break-after" attribute on div. 我在div上使用“ page-break-after”属性。
The CSS class - CSS类-
div.breakhere {
page-break-after: always;
margin: 0! important;
width: 100%;
}
.fancyTable {
height: 100px;
float: left;
}
and the div in the page is 并且页面中的div是
<div id="summary" width="100%">
<table class="fancyTable" width="50%" ></table>
<table class="fancyTable" width="50%"></table>
</div>
<div class="breakhere"> </div>
It's working perfectly except following case. 除以下情况外,它运行正常。
What actually I am doing wrong? 实际上我在做什么错? Thanks in advance.
提前致谢。
I solve the problem. 我解决了问题。
Problem is the float left in the fancyTable class -- .fancyTable { height: 100px; 问题是fancyTable类中的浮点数-.fancyTable {height:100px; float: left;
向左飘浮; }
}
I just nest the tables instead of giving them width 50%. 我只是嵌套表格而不是给它们提供50%的宽度。 like -
喜欢 -
<div id="summary" width="100%">
<table>
<tr>
<td><table id="table1" class="fancyTable" width="50%" ></table></td>
<td><table id="table1" class="fancyTable" width="50%" ></table></td>
</tr>
</table>
</div>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.