Getting paid / Bank details block
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.
Why this block is harder than it looks
This block exists to be transcribed by hand, which makes it the one block in the document where legibility beats every other consideration. An IBAN is up to thirty-four characters of mixed letters and digits with no natural grouping, and set as an unbroken string in a proportional face it is close to unreadable. The characters that get confused are known and specific: zero against capital O, one against capital I against lowercase l, five against S, eight against B. And the block must never wrap in a way that suggests a space that is not part of the number.
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.
- Group an IBAN in blocks of four with a real space between the groups. That is the printed convention and it more than halves the transcription error rate.
- Use tabular figures and a face where zero is distinguishable from capital O. If the document face does not do that, set this block in the monospace face and accept the change of texture.
- Set white-space: nowrap on each number so a wrap can never be mistaken for a space in the value.
- Label each field with the name the payer's own banking screen uses, not the internal one. Sort code and routing number are not interchangeable and neither is a generic bank code.
- Keep the whole block together with break-inside: avoid. Half a set of bank details is not less useful, it is dangerous.
- Do not print the details in light grey to be tasteful. This is the block most likely to be photocopied, faxed and scanned.
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.
<dl class="bank">
<dt>Account name</dt><dd>Wynne and Hall Ltd</dd>
<dt>IBAN</dt><dd class="num">GB29 NWBK 6016 1331 9268 19</dd>
<dt>BIC</dt><dd class="num">NWBKGB2L</dd>
<dt>Reference</dt><dd class="num">WH-2026-0418</dd>
</dl>
<style>
.bank {
display: grid;
grid-template-columns: auto 1fr;
column-gap: 10pt;
row-gap: 3pt;
margin: 0;
break-inside: avoid;
}
.bank dt { color: #555; white-space: nowrap; font-size: 9pt; }
.bank dd { margin: 0; }
.bank .num {
font-family: "IBM Plex Mono", ui-monospace, monospace;
font-variant-numeric: tabular-nums;
white-space: nowrap; /* a wrap must never look like a space */
letter-spacing: 0.02em;
}
</style>What breaks when it is built the obvious way
Printing an IBAN as one unbroken thirty-four character string because the grouping is not part of the stored value. The grouping is a display convention, it is not stored anywhere, and adding it is the single highest-value change you can make to this block.
How to prove it survived pagination
Print it, hand it to somebody, and ask them to type the IBAN into a text box. Then compare. That is a five-minute test that catches the font problem, the grouping problem and the size problem at once, and no amount of looking at the screen substitutes for it.
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 invoice 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.
Payment terms and due date that cannot be missed or misread
The line that says when the money is due and what happens if it is not, which is short, easy to write and easy to place somewhere nobody reads.
A tear-off remittance slip at the foot of an invoice
A detachable panel at the bottom of the page carrying the reference, the amount and the payee, meant to be torn off and returned with a payment.
An instalment schedule where the amounts visibly add to the total
A table of dated payments making up a total, used on staged contracts, payment plans and deposit-plus-balance arrangements.
A terms page set in dense small type that stays readable
The block of standard terms, usually on the reverse or at the end, which has to fit in a fixed space without becoming unreadable.
Invoice, as a complete file
The whole document with this block already in place, ready to copy and change.
font-variant-numeric 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.