Is it possible to print HTML pages with custom headers and footers on each printed page?
I\'d like to add the word \"UNCLASSIFIED\" in Red, Arial, size 16pt to the t
Based on some post, i think position: fixed
works for me.
body {
background: #eaeaed;
-webkit-print-color-adjust: exact;
}
.my-footer {
background: #2db34a;
bottom: 0;
left: 0;
position: fixed;
right: 0;
}
.my-header {
background: red;
top: 0;
left: 0;
position: fixed;
right: 0;
}
Header & Footer
Fixed Header
TH 1
TH 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2
TD 1
TD 2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