Intro to Design Grids
Learn the parts of a grid and how fixed, fluid and responsive grids shape a layout.
A grid is the invisible structure behind a layout. This lesson covers its parts, such as columns, rows, gutters, margins and modules, the main kinds of grids, and how elements inside a grid behave when the screen changes size.
Grid

A grid is a set of horizontal and vertical lines that divide a layout into regular areas. In the example, the orange guides split the frame into columns and rows.
Elements are placed along these lines. Most fill one cell, while the teal block spans two columns but still lines up with the rest.
A grid makes layouts consistent from screen to screen, speeds up design decisions and gives designers and developers a shared structure to work from.
Columns

Columns are the vertical sections of a grid, as the example shows. They are its most important building block.
Content sits inside columns and often spans several of them. A sidebar might take 3 columns and the main content 9, for example.
The number of columns usually changes with screen size. Twelve columns are common on desktop because 12 divides evenly into halves, thirds and quarters, while phones often use 4.
Rows

Rows are the horizontal sections of a grid, as the example shows.
On the web, row heights are usually set by the content, so they are more flexible than columns. In print and in fixed formats, such as dashboards, rows are often set in advance.
Rows work together with columns to organize content in both directions, and they help people scan from one item to the next.
Gutters

Gutters are the gaps between columns and rows. In the example, the orange arrows mark the space between each block. In CSS, they are called gaps.
Gutters keep content from touching and give the layout room to breathe. An element can span across a gutter when it covers several columns, but it should not start or end inside one.
Keep gutters the same size throughout a grid. Wider gutters feel airy; narrow ones feel dense and suit data-heavy screens.
Margins

Margins are the space between the grid and the edge of the screen. In the example, the orange areas on each side are the margins.
They keep content from touching the screen edge, which makes it easier to read and to tap.
Margins usually grow with screen size: narrow on phones, wider on large screens.
Modules

A module is a single cell of a grid, formed where a column and a row meet. In the example, the orange square is one module.
Modules act like containers. A module can hold an image, a block of text or a button, and larger items can span several modules.
Grids built from modules, called modular grids, suit content made of many similar items, such as photo galleries, product listings and dashboards.
Fixed grid
A fixed grid has columns and gutters of a set width that do not change with the screen. In the video, the window gets smaller but the grid keeps its width, so the last column is cut off.
Fixed grids are predictable and easy to build. They suit formats with a known size, such as print and kiosks.
On screens smaller than the grid, content overflows and people may have to scroll sideways.
Fluid grid
A fluid grid uses proportional widths, so columns grow and shrink with the screen. In the video, the columns resize together while the gutters stay the same.
Columns share the available space in proportions, so they grow or shrink together. Percentages are one way to achieve this.
Fluid grids adapt smoothly, but on very wide or very narrow screens content can become too stretched or too cramped. Minimum and maximum widths help.
Responsive grid
A responsive grid changes its structure at set screen widths called breakpoints. In the video, the grid switches from three columns to two when the window gets narrower.
At each breakpoint, the number of columns, the gutters and the margins can all change. Between breakpoints, columns usually resize fluidly.
Choose breakpoints based on your content, at the width where it starts to feel cramped, rather than on specific device sizes.
Baseline grid

A baseline is the invisible line that text sits on. A baseline grid is a set of evenly spaced horizontal lines that every line of text sits on, as the example shows.
When headings and body text follow the same baseline grid, text lines up across columns and the page has a steady vertical rhythm.
Many teams use a 4 or 8 px baseline and set line heights in multiples of it.
Fixed element
A fixed element keeps the same size when its container changes. In the video, the Continue button stays 310 px wide while the window around it grows and shrinks.
Fixed sizes are predictable. They suit things that should stay the same everywhere, such as icons, avatars, logos and some buttons.
A fixed size can cause problems if it is wider than the smallest screen it has to fit, so check it on narrow screens.
Fluid element
A fluid element changes size with its container. In the video, the Continue button stretches to 821 px to fill the wider space.
Fluid elements resize with their container, which is useful for content areas, text fields and buttons on mobile.
Set limits. A minimum width keeps an element usable, and a maximum width stops it from becoming awkwardly wide on large screens. A minimum width can still cause overflow if the container becomes narrower than that limit.