Getting paid / Overdue notice band
An overdue band that is unmissable without shouting
A band across the top of a reminder saying how overdue the amount is, sitting above an otherwise ordinary invoice layout.
Why this block is harder than it looks
The band has to be the first thing read on a document that otherwise looks exactly like the invoice already ignored once, which is a real hierarchy problem rather than a decorative one. The instinct is a solid red bar, and it fails twice: print backgrounds are frequently disabled, so the bar disappears and takes the white text on it with it, and a document that shouts is filed by the recipient as aggressive rather than acted on. The band also has to state a specific number of days, which means it is generated from a date calculation that has to be right.
The decisions that make it work
Reasons rather than a description of the code. Each of these is a choice that has a wrong answer, and the wrong answer is usually the default.
- Never put light text on a coloured background. If the background does not print, the text goes with it, and the most important sentence on the page is gone.
- Use dark text on a light tint, with a heavy rule above and below, so the band survives having its background dropped.
- Set print-color-adjust: exact on it anyway, so it keeps the tint where the pipeline allows.
- State the specific number of days and the original due date, not just overdue. A number is actionable and a word is not.
- Keep it to one line of large text plus one line of detail. A five-line band is a paragraph, and paragraphs at the top of a page get skipped.
- Put it above the letterhead area rather than below the invoice header, so it is read before the document is recognised as a familiar shape and set aside.
The fragment
Markup and the CSS it needs, and nothing else. It expects a document that already has a page rule and a base stylesheet, so paste it into one rather than opening it on its own.
<div class="overdue">
<p class="headline">Payment is 31 days overdue</p>
<p class="detail">Invoice 2026-118 for 5,016.00 was due on 13 April 2026.</p>
</div>
<style>
.overdue {
break-inside: avoid;
margin-bottom: 12pt;
padding: 7pt 9pt;
background: #f6e7e2; /* light tint, dark text */
border-top: 2pt solid #d23a1d;
border-bottom: 2pt solid #d23a1d; /* rules survive without the tint */
print-color-adjust: exact;
-webkit-print-color-adjust: exact;
}
.overdue .headline {
margin: 0;
font-size: 13pt;
font-weight: 700;
color: #7d1f0c;
}
.overdue .detail {
margin: 3pt 0 0;
font-size: 9pt;
color: #4a2018;
}
</style>What breaks when it is built the obvious way
White text on a solid red bar. It is the version that looks strongest on screen and the version that vanishes entirely on a printer with backgrounds off, leaving a blank strip where the notice was. Dark on light degrades to dark on white, which is still readable.
How to prove it survived pagination
Print the page twice, once with backgrounds on and once with them off. Both times the headline should be the first thing you read. If the second print has a gap where the band was, the contrast is the wrong way round.
Where it sits in a finished document
This page is one block. The document it belongs to has a page rule, a base stylesheet, a header and everything else around it, and repeating all of that here would make thirty pages that say the same thing. The payment reminder template is a complete file with this block already in it, so take that and change the fragment rather than assembling one from parts. The property doing most of the work here is covered on its own page, with the support caveats that belong there rather than here.
Frequently asked
Will this fragment work on its own?
Not as a whole document. It has no page rule, no margins and no base type, because those belong to the document rather than to the block, and duplicating them in every fragment would mean thirty copies to keep in step. Paste it into a template that already has them.
Why does it look right in a browser and wrong in the PDF?
Because a browser window is one continuous surface and a document is a stack of fixed rectangles. Nothing in a scrolling view exercises a page boundary, so every break rule in the fragment is inert until the content is paginated. Render the real thing with enough content to cross two or three boundaries, then look.
Do I need a special option on the render request for this?
No. Everything on this page is CSS and markup, which is your side of the boundary. What the render has to give you is a real page size with real margins, and after that the layout is decided by the stylesheet.
Other parts of a document
The blocks that sit next to this one, and one from the next group along so you are not sealed inside a single kind of problem.
A credit block that cannot be mistaken for an amount owed
The amount being credited or refunded, on a credit note, laid out so nobody reads it as another bill.
A QR payment block that still scans off the printed page
A machine-readable payment code beside the amount and reference, so a payer can scan instead of typing an account number.
A bank details block that can be transcribed without errors
Account number, sort code or routing number, IBAN and BIC, set so that a person copying them into a banking screen gets them right the first time.
A confidentiality marking on every page that cannot be missed
A classification such as confidential or commercial in confidence, printed on every page so a single sheet carries its own handling instruction.
Payment reminder, as a complete file
The whole document with this block already in place, ready to copy and change.
print-color-adjust in paged output
The property carrying the weight here, with its real support status.
Every part of a document
The full list, grouped by the kind of problem the block poses.
Paste the fragment into the playground inside a page rule and see what it does at a real page size. That is the only way any of this gets confirmed.