Sub topic 2
The parts of a grid
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 example at the end assumes basic HTML and CSS.
A grid is a set of guides that divides a page or screen into regions. Every grid, from a simple book page to a complex news front page, is built from the same few parts. Learn the names now, because the later chapters use them constantly.
The six parts
- Margins are the empty areas between the content and the edge of the page or viewport. They frame the content and keep it away from trimming and device edges.
- Columns are vertical bands that hold text and images. Content aligns to their left and right edges.
- Gutters are the gaps between columns. They stop adjacent columns of text from running together.
- Rows are horizontal bands. Many text grids have no visible rows. They matter in modular grids and in screen layouts.
- Modules are the rectangles formed where a row crosses a column. A grid with rows and columns is called a modular grid.
- Flowlines are horizontal guides that mark where content starts or stops, such as the top of a headline or the bottom of an image. They run across the columns and make the same start points repeat from page to page.
How the parts depend on each other
The parts are not independent. Changing one changes the others.
- Page width equals two margins, the columns, and the gutters between them. If you add a column, each column gets narrower.
- Gutters number one fewer than columns. Four columns have three gutters.
- Modules exist only where a column and a row cross. A grid with only columns has columns, not modules.
- Flowlines depend on type. They usually sit on the lines of a baseline grid, which later chapters cover.
Together these give you the distinction you will use most. A single-column grid has one text area inside the margins. A multi-column grid divides the width into several columns. A modular grid divides both the width and the height.
Seeing the parts in code
CSS Grid uses the same vocabulary. This stylesheet draws a four-column grid with rows, so each part is visible in the code.
.page {
display: grid;
padding: 2rem; /* margins */
grid-template-columns: repeat(4, 1fr); /* four columns */
column-gap: 1rem; /* gutters */
grid-template-rows: repeat(3, 8rem); /* three rows */
row-gap: 1rem; /* space between rows */
}Four columns and three rows make twelve modules. Content placed in this grid always starts and ends on a module edge.
Common mistakes
- Calling the margin a gutter. The gutter sits between columns. The margin sits outside them.
- Making gutters too narrow. Text in neighbouring columns then looks like one line. Set the gutter at least as wide as a few characters of body text.
- Treating the grid as visible. Readers never see the guides. They see the consistent alignment the guides produce.
Exercise
A page grid has 5 columns. How many gutters does it have, and what is a module?
Show answer
It has 4 gutters, one fewer than the number of columns. A module is the rectangle formed where a row crosses a column.
Exercise
In the CSS example, which property creates the margins, and which creates the gutters?
Show answer
padding on .page creates the margins. column-gap creates the gutters between columns.