Who the document is between / Reference block
A block of reference numbers that survives being quoted back
Purchase order number, contract reference, project code, job number and whatever else both parties use to match this document to their own records.
Why this block is harder than it looks
Every reference in this block exists to be typed into somebody else's system, which makes transcription the only design consideration that matters. That means the same treatment bank details get: a legible face, no ambiguity between similar characters, no wrapping and no confusion about where one reference ends and the next begins. The layout problem is that references vary wildly in length, from a four-digit job number to a forty-character system identifier, so a fixed two-column grid built for the short ones breaks on the long ones and one built for the long ones wastes half the width.
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.
- Set the values in the monospace face with tabular figures, for the same reason bank details are set that way: these are transcribed rather than read.
- Set white-space: nowrap on every value and let a long reference overflow its cell rather than wrap, because a wrapped reference is routinely retyped with a space in it.
- Give the block an auto-sized label column and let the values take the rest, rather than fixing both, so a long reference has somewhere to go.
- Label with the counterparty's own name for the field. Your project code is their nothing, and Your order number is understood by everybody.
- Order by whose reference it is: theirs first. The reference they need to match against is the one they are looking for.
- Never split a reference across lines with a hyphen inserted by hyphenation. Set hyphens: none on the block.
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="refs">
<dt>Your order</dt><dd>PO-4471-2026-0088</dd>
<dt>Your contract</dt><dd>WH/SUP/2024/117</dd>
<dt>Our reference</dt><dd>JOB-20260314-A</dd>
</dl>
<style>
.refs {
display: grid;
grid-template-columns: auto 1fr; /* label sized to content, value takes the rest */
column-gap: 10pt;
row-gap: 3pt;
margin: 0;
break-inside: avoid;
hyphens: none;
font-size: 9pt;
}
.refs dt { color: #555; white-space: nowrap; }
.refs dd {
margin: 0;
font-family: "IBM Plex Mono", ui-monospace, monospace;
font-variant-numeric: tabular-nums;
white-space: nowrap; /* overflow rather than wrap */
letter-spacing: 0.02em;
}
</style>What breaks when it is built the obvious way
Letting a long reference wrap because the block is in a narrow column. The break lands mid-identifier, whoever retypes it inserts a space or a hyphen where the wrap was, and the document arrives in their system unmatched. Overflow is ugly and correct; wrapping is tidy and wrong.
How to prove it survived pagination
Render with your longest possible reference in the narrowest column the block will occupy. Nothing should wrap. Then print it and have somebody type all three references into a text box: any character they hesitate over is a font problem, not a user problem.
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 purchase order 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.
Three or more parties on one document without a wall of addresses
A document between more than two parties, where each needs identifying and the relationship between them has to be clear.
A list of people present, with roles and space to sign
Names, roles and organisations of the people present at a meeting, inspection or signing, sometimes with a signature space each.
A site block with an address, a reference and access notes
Where work is to happen, which is often not a postal address and usually needs a reference, a grid position and a note about getting in.
Showing a deposit already paid and the balance still due
A block that subtracts what has already been received from the invoice total and states the remaining amount, which is the only figure the payer should act on.
Purchase order, as a complete file
The whole document with this block already in place, ready to copy and change.
overflow-wrap 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.