Sub topic 5
Multi-column grids
This chapter assumes you know basic typography terms (point size, leading, line length) and have used a layout tool such as InDesign, Affinity Publisher or Figma. The CSS examples assume basic HTML and CSS.
What a multi-column grid is
A multi-column grid divides the live area of a page into vertical columns separated by gutters. Text and images sit inside one column or span several. Columns control horizontal structure only. Rows and modules come later, in the modular grid chapter.
The column count follows from the content and from the line length you want. A long report with continuous prose may need two columns. A magazine that mixes articles, captions and pull quotes may need five or six, because more columns give more ways to place things.
Choosing the column count
Start from the measure, which is the comfortable line length for your type size. For body text, roughly 45 to 75 characters per line reads well. Pick a column width that gives that measure, then see how many fit across the live area.
Some counts are more flexible than others:
| Columns | Typical use | Flexibility |
|---|---|---|
| 1 | Books, long essays | One text width, few layout options |
| 2 | Reports, academic papers | Equal columns, or one wide and one narrow |
| 3 | Newsletters, brochures | Spans of 1, 2 or 3 columns |
| 4 | Magazines, web layouts | Spans of 1, 2 or 4; two halves |
| 12 | Web frameworks | Spans of 2, 3, 4 or 6 columns |
Twelve divides evenly by 2, 3, 4 and 6, which is why web systems favor it. Large grids let you build many layouts, but you can still use only a few spans consistently.
Calculating column width
The widths are arithmetic. Subtract both side margins from the page width to get the usable width. Subtract the gutters, which number one fewer than the columns. Divide what remains by the column count.
def column_width(page_width, margin, gutter, columns):
"""Width of one column when both side margins are equal."""
usable = page_width - 2 * margin
return (usable - (columns - 1) * gutter) / columns
# A4 portrait is 210 mm wide: 20 mm margins, 5 mm gutters, 4 columns
print(column_width(210, 20, 5, 4)) # 38.75Here the usable width is 170 mm. Three gutters take 15 mm, leaving 155 mm, so each column is 38.75 mm wide.
A common error is subtracting one gutter per column instead of one fewer than the column count. This leaves the grid too narrow and the right margin wrong. Another is rounding column widths to whole units, which makes the columns drift off the right margin. Calculate in a fine unit, or let the layout tool distribute the remainder.
Spanning columns
The grid is useful because content can occupy more than one column. A span includes the gutters it crosses. A two-column span in the example above is 2 × 38.75 + 5 = 82.5 mm. Spans keep the edges of text blocks and images aligned to the same vertical lines, even when the blocks have different widths.
Implementing it in CSS
CSS Grid expresses the same structure directly. A 12-column grid with a fixed gutter places a main article across eight columns and a sidebar across the remaining four.
.columns {
display: grid;
grid-template-columns: repeat(12, 1fr);
column-gap: 1.5rem;
max-width: 72rem;
margin-inline: auto;
}
.article { grid-column: 1 / span 8; }
.sidebar { grid-column: 9 / span 4; }The 1fr units share the space left after the gaps, so the browser does the subtraction from the Python function for you.
Common errors
- Placing text boxes by eye so they miss the column edges by a point or two.
- Using columns too narrow for the type size, which gives ragged lines and many hyphens.
- Setting gutters so small that adjacent columns read as one block.
- Mixing column counts on one page without a shared multiple.
Exercise
A page is 297 mm wide with 15 mm margins on each side and 6 mm gutters. How wide is each column in a 6-column grid, and how wide is a span of two columns?
Show answer
Usable width is 297 - 30 = 267 mm. Five gutters take 30 mm, leaving 237 mm. Each column is 237 / 6 = 39.5 mm. A two-column span is 2 × 39.5 + 6 = 85 mm.