gillish

Choose the right layout block

Gillish Cairnstone has three blocks A piece of a page, such as a paragraph, a picture or a button. In WordPress you build a page by putting blocks one after another. that hold other blocks: Container, Columns and Frame. They are the structure a page is built on. Start with a Container: it can hold blocks one under the other, side by side, or in a grid, so it covers most layouts on its own.

The short answer

  • A band across the page with its own background or padding: Container.
  • A bar with things at each end, or a short line of items side by side: a Container set to Side by side.
  • A layout of boxes, like a narrow and a wide box, or two by two: a Container, and pick the grid picture.
  • Two to five parts in set proportions, like text beside a picture: Columns.
  • Many equal things in rows, like logos or cards: a Container grid with Boxes per row.
  • A close button in a corner, or a badge hanging over the edge of a card: a Container set to Placed freely.
  • A card, a panel or a small group whose size and spacing you set by dragging: Frame.
  • Not sure yet: a Container, and pick from its pictures.

They nest inside each other. A typical page uses a Container for the section, Columns for the split inside it, and a Frame for each card.

The block inserter showing Cairnstone's Container, Row, Columns, Frame and Repeater blocks, then Accordion, Audio, Author Bio Card and Badge.
Cairnstone’s layout blocks in the inserter.

Start with a Container

Insert a Container and, while it is still empty, it asks you to choose a layout. Pick one of the pictures; hold the pointer over one to see its name. The first two are One under the other and Side by side, each at its own width. The other twelve are grids, from one to four equal boxes to a narrow and a wide box. Each box in a grid is a Container of its own, ready to fill. Skip gives one under the other. Nothing is locked in: you can change it later.

A new, empty Container in the editor asking to choose a layout, with fourteen pictures of layouts and a Skip link below.
A new Container asks you to choose a layout.

Container

Use a Container when part of the page should share a background, padding or a border. You can set its width to normal, wide, full width or a custom width. A Container placed directly on the page, not inside another block, can also stick to the top while the page scrolls (Position, Sticky).

A Container can have less padding on a small screen. In its Section panel, set Padding on a tablet and Padding on a phone, one value per side. A side you leave empty keeps the larger screen’s padding, and a phone uses the tablet’s unless you give it its own. For example, padding of 96 pixels top and bottom on a desktop, 48 on a tablet and 24 on a phone keeps a section roomy on a wide screen and compact on a phone. Use the screen buttons at the top of the editor to see each one.

A selected Container in the editor: a sand-coloured band holding a heading, a line of text and a button, with its outline round it.
A Container: one section with its own background.

To make a card or a tile that is one link, paste a link under Link in the Container’s Section panel. A click anywhere in it follows the link, and links and buttons inside still go to their own place. Give the section a heading: the heading becomes the link’s name for screen readers A program that reads the screen aloud, for people who cannot see it well. They move around the page with the keyboard and hear what is there..

Select a Container and the toolbar shows Stacked and Side by side. Stacked puts what it holds one under the other. Side by side lays it out in a row; the inserter also offers it directly as Row. Its Layout panel sets where the blocks sit (left, centre, right, or spread out with space between them) and whether they wrap onto a new line, as in a header bar with a name at one end and links at the other.

A Container set to Side by side has two more choices in its Section panel. Same width gives every block in the row the same width, and together they fill the whole row, as in a bar of buttons that runs from edge to edge. For a pair of buttons under a heading, use the Button Group block instead: it centres them, each as wide as the longer one. On a narrow screen chooses what the row does on a phone or a narrow window (below 782 pixels): keep the blocks as they are, wrap them onto a new line, stack them each at its own width, or stack them across the full width.

A Container made from a grid picture divides its width into twelve equal parts, and each box takes some of them: half is six, a third is four, a quarter is three. Change a box’s share with Column span in its Styles tab; the boxes around it keep theirs. On a phone or a narrow window (below 782 pixels) every box takes the full width, one under the other. To keep two small boxes side by side on a phone, choose Width on a narrow screen in each box’s own settings. A grid keeps its boxes side by side inside a Modal too, and a Container in a Modal uses the Modal’s full width.

A Container inside another box can also sit on top of what is around it, like a close button in the corner of a Modal or a badge on a card. In its Section panel, set Placement to Placed freely. It stays where it was and is pinned to the nearest corner of the box it is in. Drag the handle at its top corner to move it, or type the two distances in pixels; a negative number lets it hang over the edge. Bring forward and Send backward choose which of two overlapping boxes is in front, and Hide on a narrow screen hides it below 782 pixels, so a box that hangs out does not make a phone scroll sideways.

Columns

Columns gives you eight ready splits, from one column up to five equal ones. Drag the edge between two columns to change the split, or type an exact width. Percentages are the safe choice, because they stay correct on any screen.

Two Columns selected in the editor: a photo of a tent by a lake beside a heading, text and a button.
Columns: content side by side.

Good to know: a Columns row stacks based on its own width, not the screen width. Three columns in a narrow sidebar stack even on a big monitor.

A grid of equal boxes

For many equal things in rows, such as logos, badges, team members or cards, insert a Container and pick one of the even grid pictures: two, three or four in a row, two by two, or three by two. In the grid’s Section panel, Boxes per row sets how many sit in a row: 1, 2, 3, 4 or 6. The picture sets it for you. Add as many boxes as you like: they fill row after row, and a box you add later gets the same width as the rest.

Boxes per row on a narrow screen sets how many sit side by side on a phone. Leave it as it is and they go one under the other, or choose 2, 3, 4 or 6. For five in a row, set Max. columns to 5 in the grid’s Layout panel.

Cairnstone used to have a separate Grid block. It is no longer in the block list, but a page that already holds one shows it and lets you edit it as before.

Frame

A Frame arranges a small group of blocks in a stack or a row, with one spacing between them. You set size, spacing and position by dragging in the editor. A Frame can also be placed freely. Move a placed Frame by dragging the grip at its top corner, with the arrow buttons under Position and size in its toolbar, or by typing the two distances in pixels: click Exact position in its settings to open the fields. A negative number lets it hang over the edge.

A selected Frame in the editor stacking a heading, a line of text and two buttons, with its spacing between them.
A Frame: a few pieces stacked inside one card.

Next, read Make a layout work on phone, tablet and desktop.

Trails

Cairnstone