2014-01-29 47 views
0

我想我的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後面,我希望它始終處於頁面底部。

任何幫助?

+0

因此您只需要一個頁腳? – DhruvJoshi

+0

不,我想在每個頁面的頁腳。但是在每個頁面的底部,而不是內容結束的地方 – 1Mayur

回答

0

中添加這個CSS到您的頁腳股利,它應該解決您的問題

在這個線程類似
style="clear: both;"