How can I print page numbers on pages when printing html using IE and/or Edge?
I try to use the examples posted by Donvino, however they don't work for me using IE and/or Edge browsers.
Below is the code that I use.
In CSS:
/Different style sheets for print media type/
@media print
{
body
{
counter-reset: page;
}
/*Always insert a page break before each section (when printing)*/
section {page-break-before: always;}
#print-footer
{
display: block;
position: fixed;
bottom: 0;
left:0;
}
#print-footer:after
{
counter-increment: page;
content:"Page " counter(page);
}
}
Then just before at the end of my html body:
<footer id="print-footer">
<p>Hege Refsnes (#12652)<BR>
May 28, 2014</p>
</footer>
When I print my HTML document, the footer will display on every page and the page number will not increment.
What I need is to have the footer start displaying from page 2, and it would be nice to have the page counter increment on each page.