a few months ago I was able to show page numbers when printing HTML documents in the browser (firefox) with the following code:
<html>
<head>
<style type="text/css">
body {
width: 300px;
counter-reset: page;
}
#header {
border: 1px solid;
overflow: hidden;
}
#header>div {
float: left;
width: 50%;
line-height: 100px;
text-align: center;
}
#foot {
border: 1px solid;
}
#header p {
margin: 0;
}
#header #pagenum {
border-left: 1px solid;
width: calc(50% - 1px);
}
@media print {
.pageBreak {
page-break-before: always;
padding-bottom: 120px;
}
#content {
padding-top: 120px;
}
#header {
display: block;
position: fixed;
top: 0pt;
left: 0pt;
right: 0pt;
}
.pagenum:after {
content: "Page " counter(page);
counter-increment: page;
}
#foot {
display: block;
position: fixed;
bottom: 0pt;
}
}
@media screen, handheld {
#header {
display: none;
}
#foot {
display: none;
}
}
</style>
</head>
<body>
<div id="header">
<div id="headertitle">
<p>Header</p>
</div>
<div class="pagenum"></div>
</div>
<div id="content">
This is the page 1
<div class="pageBreak"></div>
This is the page 2
<div class="pageBreak"></div>
This is the page 3
<div class="pageBreak"></div>
This is the page 4
<div class="pageBreak"></div>
</div>
<div id="foot">
Foot Notes
</div>
</body>
</html>
That works in firefox portable 45.7.0. Since a few months after the last firefox updates it is not working anymore. I use currently firefox quantum 69.0. My question: 1. is it no longer supported? 2. How can I show correct page numbers on every page when printing html documents?
Best regards