I'm trying to print a dynamic footer at the bottom of every printed page, using css + html.
This is the html code
<div class="footer">"
<p>Footer static message</p>
<p class="pages">Pag:
<span id="pagenumber"></span>/
<span id="pagecount"></span>
</p>
</div>
and this is the relevant part of the css
.pages {
text-align: "center";
font-family: "Times New Roman";
font-size: 9.75pt;
color: #000000;
}
.footer {
position: running(footer);
text-align: left;
font-family: "Times New Roman";
font-size: 9.75pt;
color: #A0A0A0;
padding-bottom: 20px;
}
@page {
@bottom-center { content:element(footer);}
}
#pagenumber:before {
content: counter(page);
}
#pagecount:before {
content: counter(pages);
}
the "footer static message" is printed correctly, but the page counter is mostly cut away from the page, i can see just the top part of it. How can i change the css so that the printed footer stays inside the bottom margin?
UPDATE
I solved the problem by using divs instead of p tags, the css is unchanged.
<div class="footer">"
<div>Footer static message</div>
<div class="pages">Pag:
<span id="pagenumber"></span>/
<span id="pagecount"></span>
</div>
</div>
tags to