我目前正在尝试避免在div的中间出现分页。我希望只有在div的中间发生分页时才会分页。但是,我尝试了page-break-inside:avoid,但它没有起作用。我不能在div之前强制进行分页,因为我不知道页面的长度。如果有任何帮助或另一个想法,那就太好了。
这里是我试图避免分页的div:
<div style="page-break-inside: avoid;">
<h2 style="height:18px;">
<span>
<div style="width:52%; float:left;">**Delinquency Notice** as of 12/31/13</div>
<div style="width:48%; float:left;">Recent Account History</div>
<div styly="clear:both;"/>
</span>
</h2>
<div>
<div class="leftColumn">
<div class="small_padding">
<span class="bold_text">
You are late on your mortgage payments.
</span>
As of 4/17/2015, you are 106 days late on your mortgage payments.
Failure to bring your loan current may result in fees and
foreclosure -- the loss of your home.
<div class="small_top_padding">
If you are experiencing financial difficulty, HUD (U.S. Dept
of Housing and Urban Development) approved counseling agents
are available to provide mortgage and foreclosure counseling
assistance. Refer to the HUD disclosure section on the
statement front for contact information.
</div>
</div>
</div>
<div class="rightColumn">
<div class="recent_history_body">
<ul style="list-style-type: disc;">
<li>Payment due 12/01/2014: Fully paid on 11/30/2014</li>
<li>Payment due 1/01/2015: Unpaid balance of $1,290.02</li>
<li>Payment due 2/01/2015: Fully paid on 1/31/2015</li>
<li>Payment due 3/01/2015: Fully paid on 2/28/2015</li>
<li>Payment due 4/01/2015: Fully paid on 3/17/2015</li>
<li>Current payment due 5/01/2015: $1,290.02</li>
</ul>
<div class="recent_history_total">
Total: $6,495.86 due. You must pay this amount to bring your loan current.
</div>
</div>
</div>
</div>
</div>
这是Google Chrome中打印页面的截图。
![打印换行](https://istack.dev59.com/j3bhf.webp)