Who the document is between / Site and location block
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.
Why this block is harder than it looks
A site is not an address and treating it as one loses the information that matters. A plot on a development, a stretch of road, a rooftop plant room and a field all need identifying, and none of them has a letterbox. So the block carries a mixture: a postal address where one exists, a coordinate or reference where one does not, and free text about access. Those three have different alignment needs, and putting them in one address-shaped block makes the coordinate wrap and the access note look like part of the address.
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.
- Separate the three into labelled parts: address, position and access. Merging them produces a block where the reader cannot tell which line is which kind of information.
- Set the coordinate or grid reference in the monospace face with white-space: nowrap. It is transcribed into a device and must not wrap.
- Let the access note be free text with room to be two or three lines, because that is the field that actually varies.
- Where there is no postal address, say so explicitly rather than leaving the field blank. A blank address on a site block reads as missing data.
- Keep the whole block together with break-inside: avoid. Somebody reads this on a phone in a van and needs it in one piece.
- Give the site reference the most prominence, since that is the field quoted on every other document about the same site.
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.
<section class="site">
<p class="ref">Site SP-2026-0044</p>
<dl>
<dt>Address</dt>
<dd>Plot 14, Callow Development, off Bridge Street, Sheffield S3</dd>
<dt>Position</dt>
<dd class="coord">53.3811, -1.4701</dd>
<dt>Access</dt>
<dd>Gate 2 on the north side. Keys held at the site office, open from
07:00. Hard hat and boots required beyond the gate.</dd>
</dl>
</section>
<style>
.site { break-inside: avoid; margin: 10pt 0; }
.site .ref {
margin: 0 0 5pt;
font-size: 11pt;
font-weight: 700;
}
.site dl {
display: grid;
grid-template-columns: auto 1fr;
column-gap: 10pt;
row-gap: 4pt;
margin: 0;
font-size: 9pt;
}
.site dt { color: #555; white-space: nowrap; }
.site dd { margin: 0; line-height: 1.4; }
.site .coord {
font-family: "IBM Plex Mono", ui-monospace, monospace;
white-space: nowrap; /* typed into a device, never wrapped */
}
</style>What breaks when it is built the obvious way
Forcing a site into the customer address block because the data model has one address field. The access note then either disappears or is appended to the address, and the person who arrives at the wrong gate had no way to know.
How to prove it survived pagination
Render a site with no postal address and one with a three-line access note. Neither should produce a blank labelled row or a wrapped coordinate. Then read the block the way somebody in a vehicle would: reference first, then how to get in.
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 work 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.
An address block with no blank lines where a field was empty
Name, street, locality, postcode and country, set as a block, where any of the middle lines may be absent for a given record and none of the gaps should show.
Bill-to and ship-to blocks side by side that stay level
Two address blocks presented as a pair, where one is who pays and the other is where it goes, and the pair has to stay legible when the two are the same and when they are wildly different lengths.
Positioning an address so it shows through an envelope window
An addressee block placed at an exact position on the page so it lines up with the cut-out in a standard window envelope when the sheet is folded.
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.
Work 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.