I want to print html page with footer on every page, the data is loaded dynamically.
The problem is, the content of page overlaps the footer. I know this happens because I am using position:fixed
on the footer.
Here is my css.
@media print {
page[size="A4"] {
width: 21cm;
height: 28.7cm;
padding: 0 0 0 0;
page-break-before: always;
}
.print {display : block;}
footer {
position: fixed;
bottom: 0;
}
}
@page {
margin-bottom: 0.3cm;
}
Html code
<body>
<button class="print">Print</button>
<page>
<p>Some very long text here.</p>
</page>
<footer>
<img scr="img/contact.jpg"></img>
</footer>
</body>
Is it possible to add padding @page
so that footer dose not over lap the content?
Thank you.