2015-01-13 71 views
-2

我想在所有打印页面上显示页脚,但仅在最后一页显示,没有任何东西适用于我。如果任何人有想法。在每个html打印页面上显示页脚

我已经搜索了很多css的建议,但没有为我工作。我的技术只在最后一页显示页脚。但我需要在所有可打印的页面上显示。

<style type="text/css"> 
html, body { 
    height: 98.5%; 
    width: 98%; 
} 
.wrapper { 
    min-height: 98.5%; 
    width: 98%; 
    height: auto !important; 
    height: 98.5%; 
    margin: 0.3in 0.5in -0.1in 0.5in; 
} 
.footer, .push { 
    margin-bottom: 0px; 
    height: 10px; 
    text-align: center; 
} 
.attachment-watermark-print { 
    font-size: 20px; 
    font-weight: bold; 
    opacity: .5; 
} 
</style> 

<div class="wrapper"> 
    <div id="content"></div> 
    <div class="push" style="clear: both;"></div> 
</div> 
<div class="footer"> 
<span id="spnWaterMark" class="attachment-watermark-print"> 
Printed from My System 
</span> 
</div> 

回答

0

使用这个在你的CSS,

.attachment-watermark-print { 
position:absolute; 
bottom:0; 
font-size: 20px; 
font-weight: bold; 
opacity: .5; 
} 

.footer类添加这些附加属性,

.footer { 
    position:relative; 
} 
+0

感谢,但这种方法仍然不工作对我来说,它只显示水只在打印模式下在最后一页标记。 – Tariq

+0

上面的CSS不是我在谷歌浏览器的问题...是否有任何解决方案铬请please..securedeveloper – Tariq

相关问题