Web Design & UI/UX8 min read

Responsive Grid Columns: 4 on Mobile, 8 on Tablet, 12 on Desktop

Twelve columns are a desktop grid. Phones get 4 columns, tablets get 8, margins grow with the screen and gutters stay on the 8 grid. The full table, the arithmetic and the CSS.

By Boone
XLinkedIn
Responsive Grid Columns: 4 on Mobile, 8 on Tablet, 12 on Desktop

A 12-column grid is a desktop grid. Carried down to a phone or a tablet, it hands you columns narrower than the gaps between them and cards too thin for their titles. Here is the grid for each screen, the arithmetic behind it, and the values to give your developer.

Why everyone starts with 12

Twelve suits a wide screen: it splits into halves, thirds, quarters and sixths, so one grid holds a two-column hero, a three-card row and a four-up feature list. That is why it is the usual default, and why it gets copied onto every frame in the file.

The trouble is that a column is not a fixed size. Its width is the screen width minus both margins and every gutter, divided by the number of columns. Keep the count at 12 while the screen shrinks and the gutters take most of the room. The four fixes below are drawn at real size with Figma's default layout grid, red at 10% opacity, over a small stays app for Lisbon that we made up for these demos.

Fix 1: phones get 4 columns

12 columns on a 360 px phone

12 columns on a 360 px phone

4 columns on the same phone

4 columns on the same phone
The same stays screen, 360 px wide, 16 px margin, 16 px gutter. Left: each of 12 columns is 12.67 px, a card spanning 4 of them is 98.67 px, and half the stay names get cut. Right: each of 4 columns is 70 px, a card spanning 2 is 156 px, and every name fits.

Take two 16 px margins and eleven 16 px gutters away from 360 px and each column is 12.67 px wide, narrower than the gutter beside it. The grid is mostly gap. Every span lands on an awkward width, so designers stop following it and nudge things by eye, which is how a phone layout drifts.

Four columns give spans that mean something. All 4 is full width, for form fields, search bars and the primary button. Two of 4 is a half, for paired cards. One of 4 is a quarter, for shortcut icons or tab bar items.

If a phone screen needs a span the 4-column grid cannot express, the screen is usually trying to be a desktop page.

Fix 2: tablets get 8 columns

12 columns on a 768 px tablet

12 columns on a 768 px tablet

8 columns on the same tablet

8 columns on the same tablet
768 px wide, 32 px margin, 24 px gutter. Left: 12 columns are 36.67 px each, a card spanning 2 is 97.33 px, and six cards in a row are too thin for their names. Right: 8 columns are 67 px each, a card spanning 2 is 158 px, and four cards in a row read cleanly.

The tablet is where the desktop grid survives by habit, because 12 columns technically fit, the way six cards fit in a row. Eight columns split into 4 and 4 for two equal panes, 3 and 5 for a list beside its detail view, 2 and 6 for a filter rail beside results, and 6 of 8, centered, for a form that should not stretch across a landscape tablet.

Fix 3: margins grow with the screen

16 px margins on a 936 px page

16 px margins on a 936 px page

120 px margins, body centered

120 px margins, body centered
The "Our story" page of Northwind, a company we made up, at 936 px with 12 columns and a 24 px gutter. Left: the phone margin of 16 px carried up to a browser window, so the logo and menu sit against the edge and the paragraph runs long. Right: 120 px margins pull the body into the center and the lines get shorter.

A 16 px margin works on a phone because the phone is its own frame: the edge of the device gives the content its border. A browser window has no such frame, so a body that runs to 16 px from the edge reads as cramped, and its lines grow too long to follow (our line length guide has the numbers for that).

That makes the margin the value that changes most between screens: 16 on a phone, 32 on a tablet, and on desktop a margin that keeps growing so the body stops at a fixed width in the middle. Material Design calls this a scaling margin; the table below writes it as "auto". Settings pages, long articles, pricing tables and checkouts all need the same treatment, because all of them stretch with the window.

Fix 4: gutters stay on the 8 grid

13 px gutter

13 px gutter

24 px gutter

24 px gutter
A saved-stays list 304 px wide with the gutter marked in red. Left: 13 px between the cards, a number nothing else on the screen uses. Right: 24 px, a step on the same 8 px scale as the padding and spacing around it.

A 13 px gutter is wrong because nothing else on the screen is 13. Padding is 16, the gap under a title is 8, section spacing is 32, and one gap at 13 does not belong. The screen looks slightly off and nobody can say why.

Keep the gutter on the same 8 px scale as everything else: 16 on a phone, 24 on tablet and desktop. The gap in a chip row, the space between stacked cards and the gap between a label and its field follow the same rule. Our spacing fixes cover the rest of the scale.

The grid table to copy

ScreenWidthColumnsMarginGutter
Phoneunder 600 px416 px16 px
Tablet600 to 904 px832 px24 px
Desktop905 px and up12auto (grows, body centered)24 px

The breakpoints, the column counts and the phone and tablet margins follow Material Design's responsive layout grid. The gutters are our pick on the 8 grid, not Material's numbers.

The arithmetic behind it

Column width = (screen width − 2 × margin − (columns − 1) × gutter) ÷ columns.

ScreenMargin, gutterWidth of one column at 12At the right count
Phone, 360 px16, 1612.67 px70 px (4 columns)
Tablet, 768 px32, 2436.67 px67 px (8 columns)
Desktop, body capped at 1040 pxauto, 2464.67 px64.67 px (12 columns)

The right count keeps a column somewhere between about 60 and 70 px on every screen. That is the real rule underneath the table: the columns stay roughly the same size, and the number of them changes.

Hand the grid to your developer

The table as CSS, phone first:

css
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; width: calc(100% - 32px); margin-inline: auto; } @media (min-width: 600px) { .grid { grid-template-columns: repeat(8, 1fr); gap: 24px; width: calc(100% - 64px); } } @media (min-width: 905px) { .grid { grid-template-columns: repeat(12, 1fr); width: min(100% - 64px, 1040px); } }

The width leaves a margin on each side: 16 px on a phone, 32 px on a tablet. On desktop, min() stops the body at 1040 px and margin-inline: auto hands the rest of the window to the margins, which is the "auto" in the table. 1040 px is our pick; a denser product can go wider.

In Figma, give each frame size its own layout grid: Columns, type Stretch, with the count, margin and gutter from the table. Figma draws it in red at 10% opacity by default, the column overlay in the phone, tablet and web pictures above. The grid systems guide covers the other grid types, modular, baseline and manuscript, that sit on top of these columns.

FAQ

How many columns should a mobile grid have?

Four. On a 360 px phone with 16 px margins and gutters, each column is 70 px and a card spanning two is 156 px. Twelve columns on the same phone are 12.67 px each, narrower than the gutters between them.

How many columns should a tablet grid have?

Eight, with 32 px margins and 24 px gutters. At 768 px a card spanning 2 of 8 columns is 158 px wide; the same span on 12 columns is 97.33 px, too thin for a photo and a name.

Is the 12-column grid still the standard?

For desktop, yes. Twelve divides into halves, thirds, quarters and sixths, which suits wide layouts. It is the wrong grid for phones and tablets, where the columns get narrower than the gutters.

What gutter size should I use?

A value on your spacing scale. On an 8 px scale that means 16 px on phones and 24 px on tablets and desktops. Avoid odd values like 13 px that match nothing else on the screen.

Should desktop margins be fixed?

No. Let them grow with the window and cap the body at a fixed width, centered. A 16 px margin on a wide window pushes the content against the edge and makes lines of text too long to read.

Sources

  • Material Design: responsive layout grid: the breakpoints at 600 and 905, 4, 8 and 12 columns, 16 px and 32 px margins, and the scaling margin on wide screens.
  • Figma Help Center: create layout guides: the default layout grid colour, red #FF0000 at 10% opacity, used for every overlay on this page.
  • Column and card widths are our own arithmetic, with the formula above. The 16 px and 24 px gutters, the 1040 px body, the 13 px and 120 px examples, the Lisbon stays app and the Northwind page are our own examples, built for this page.
  • First published as a carousel on UX Brainy.

More from Brainy Papers

Keep reading