Skip to main content

Grid Items

Every direct child of a grid is a grid item. By default the grid places items one per cell, in order. The grid builder lets you place an item yourself, make it span several cells, and align it in its cell, from the Grid Child section or by dragging on the canvas.

Paid Feature

The CSS grid builder is available in Builderius Website, Professional and Studio. It is not included in Builderius Community (Free).

Grid Item Placement​

Select an item in the grid and open Styles → Grid Child. Grid item placement has three modes.

Auto​

Screenshot showing Grid item placement set to Auto, with Column span 2 and Row span 2

The grid places the item; you only say how many cells it covers.

Column span: How many columns the item covers. Writes grid-column: span 2.

Row span: How many rows the item covers. Writes grid-row: span 2.

A span of 1, or an empty field, writes nothing.

Manual​

Screenshot showing Grid item placement set to Manual, with Column start 2 and the other fields on auto

You give the lines the item starts and ends at.

Column start / Column end: The lines the item runs between, left to right. Writes grid-column: 2 / 4.

Row start / Row end: The same, top to bottom. Writes grid-row: 1 / 3.

Any CSS line value works: a line number (2), a negative number counting from the end (-1 is the last line), or a line name (content-start). If the grid has areas, their line names, such as main-start and main-end, are offered in the fields.

Leave a field empty for auto. An end with no start is written as auto / 4.

Area​

Screenshot showing Grid item placement set to Area, with the Area name select

Area name: Pick one of the grid's areas. Writes grid-area: main.

An area that another item already sits in can still be picked. Its tooltip says which item is there, because two items in one area overlap.

Switching Modes​

Switching mode clears the item's placement: grid-column, grid-row and grid-area are removed, and you start fresh in the new mode.

The panel opens in the mode that matches the CSS. An item placed with the grid-area shorthand, such as grid-area: 2 / 1 / 4 / 3, opens in Manual with its four lines filled in. When you edit one of them, the item is rewritten as grid-column and grid-row, so only one declaration places it.

Moving and Spanning on the Canvas​

With the canvas builder on, the selected item has two handles:

Screenshot showing the selected item Card one with a move grip in its top-left corner and a span handle in its bottom-right corner

Move grip (top-left corner): Drag the item to another cell. It gets that column and row as its start, and keeps its span. The item stays inside the grid's columns.

Span handle (bottom-right corner): Drag across cells to change how many the item covers. You can drag past the last row or column; the grid adds the tracks it needs.

While you drag, a box shows the result, labelled with the cell (column 2, row 1) or the span (span 2 × 2):

Screenshot showing the span handle dragged across two columns and two rows, with the label span 2 × 2

Screenshot showing Card one covering two columns and two rows after the drag

What the handles write:

  • Span on an item in Auto writes span N
  • Span on an item placed by line number writes start / span N
  • Move writes grid-column and grid-row with the new start, plus the span if there is one

Align Self and Order​

Align Self: Vertical alignment of this item in its cell (align-self). Overrides the grid's Align items in cells. Start, Center, End, Stretch, Baseline.

Justify Self: Horizontal alignment of this item in its cell (justify-self). Start, Center, End, Stretch, Baseline.

Order: Moves the item earlier or later in the automatic placement (order). Lower comes first; the default is 0. It only affects items that are not placed by hand.

Collection Items​

A Collection inside a grid draws one element for every post. In CSS they are one element, so styling one styles all of them. The grid builder can still place a single post.

Screenshot showing a Collection grid where the first post covers two columns and two rows, with a move grip on every post

On the canvas, every post has a move grip. Dragging post 3 places only post 3: the grid builder writes its position to %local%:nth-of-type(3) and switches the panel to that selector.

In Grid Child, Apply to chooses what you are editing:

Screenshot showing Apply to with All items and Only item 3, above Grid item placement

  • All items - every post, through the panel's selector (%local%, or a class such as .post)
  • Only item n - the post you clicked, through %local%:nth-of-type(n) or .post:nth-of-type(n)

The playground example above places the first post across two columns and two rows:

%local%:nth-of-type(1) {
grid-column: span 2;
grid-row: span 2;
}

nth-of-type counts the posts only, not the Collection's own hidden <template>, so the number matches the post you see.

caution

:nth-of-type(n) targets a position, not a post. When the query returns posts in a different order, the post in that position gets the placement.

Known Issue​

On the canvas, the span handle does nothing on an item placed with the grid-area shorthand (grid-area: 2 / 1 / 4 / 3) or placed in a named area. It writes a span, but the grid-area keeps placing the item. Use Grid Child in the sidebar for these items.

Next steps: