打印时底部的页脚

时间:2014-01-29 14:10:16

标签: javascript jquery html css html5

我正在尝试在我的html页面上打印内容

格式为

<div class="header">Title of the page</div>

<div class="main">Content of the page</div>

<div class="footer">Footer of the page</div>

<div class="page-break"></div>

<div class="header">Title of the page</div>

<div class="main">Content of the page</div>

<div class="footer">Footer of the page</div>

<div class="page-break"></div>

<div class="header">Title of the page</div>

<div class="main">Content of the page</div>

<div class="footer">Footer of the page</div>

<div class="page-break"></div>

所以有三个页面,页面是动态添加的,这个CSS帮助我在打印时打破页面

.page.break{
    page-break-after:always
}

问题是页脚位于主div之后,我希望它始终位于页面底部。

任何帮助?

2 个答案:

答案 0 :(得分:0)

将此CSS添加到您的页脚div中,它应该可以解决您的问题

style="clear: both;"

答案 1 :(得分:0)

你的解决方案可能与此主题类似吗?

Footer Not Aligning At Bottom Of Content In Print Preview

相关问题