search ESC

Grid System

Responsive 12-column flexbox grid with containers, rows, columns, offsets, order, gutters and z-index. Based on .lp-container, .lp-row, and .lp-col-*.

Breakpoints
NameMin-widthContainer max-width
sm576px540px
md768px720px
lg992px960px
xl1200px1140px
2xl1400px1320px
Containers

.lp-container — responsive max-width at each breakpoint

.lp-container

.lp-container--fluid — always 100% wide

.lp-container--fluid

.lp-container-md — 100% until md, then constrained

.lp-container-md
12-Column Grid

Equal thirds

col-4
col-4
col-4

Mixed widths

col-3
col-6
col-3

Auto + fixed

col-auto
col (fills)
col-2
Responsive Columns

Stacks full-width below md, then splits into 2 columns at md, then 3 columns at lg. Resize the viewport to see the change.

col-12 · col-md-6 · col-lg-4
col-12 · col-md-6 · col-lg-4
col-12 · col-md-12 · col-lg-4
Row Columns

row-cols-3 — children auto-fill 3 per row

1
2
3
4
5
6

row-cols-1 · row-cols-md-2 · row-cols-lg-4

A
B
C
D
Column Offsets

offset-4 pushes the column 4/12 to the right

col-4 · offset-4

Centered 6-column using offset-3

col-6 · offset-3 (centered)
Column Order

Source order is 1 → 2 → 3 but order-first / order-last moves items visually.

1 (source)
2 (order-first)
3 (order-last)
Gutters

g-0 — no gutters

col-4
col-4
col-4

g-3 (12px)

col-4
col-4
col-4

g-5 (24px) — largest

col-4
col-4
col-4
Row Alignment (flex utilities)

items-center on the row

col-3
col-3
col-3

justify-between

col-3
col-3
Z-Index Scale
ClassValueUsage
.lp-z-dropdown1000Dropdown menus
.lp-z-sticky1020Sticky headers
.lp-z-fixed1030Fixed top bars
.lp-z-modal-backdrop1040Modal backdrop
.lp-z-modal1050Modal dialog
.lp-z-popover1060Popovers
.lp-z-tooltip1070Tooltips
.lp-z-toast1080Toast notifications
.lp-z-{0,10,20,30,40,50}0 — 50Numeric scale
.lp-z-n1-1Behind parent
.lp-z-autoautoReset
CSS Grid utilities

CSS Grid-specific utilities (.lp-grid-cols-*, .lp-col-span-*, .lp-row-start-*, .lp-auto-cols-*, .lp-aspect-*) live on the Grid & Aspect utilities page.

CSS Reference
ClassDescription
.lp-containerResponsive container (max-width per breakpoint)
.lp-container--fluidAlways 100% wide
.lp-container-{sm|md|lg|xl|2xl}Fluid until breakpoint, then constrained
.lp-rowFlex row with negative gutter
.lp-col / .lp-col-autoFlex-fill / content-width columns
.lp-col-{1..12}12-column widths
.lp-col-{bp}-{1..12}Responsive columns (breakpoint-up)
.lp-row-cols-{1..6}Auto-split children into N equal columns
.lp-row-cols-{bp}-{1..6}Responsive row columns
.lp-offset-{0..11}Column offset (margin-left)
.lp-offset-{bp}-{0..11}Responsive offset
.lp-order-{0..12}Visual order
.lp-order-{first|last}Move to start / end
.lp-order-{bp}-*Responsive order
.lp-g-{0..5}Gutter scale (both axes)
.lp-gx-{0..5} / .lp-gy-{0..5}Axis-specific gutters
.lp-g-{bp}-* / .lp-gx-{bp}-* / .lp-gy-{bp}-*Responsive gutters
.lp-z-{dropdown|sticky|fixed|modal-backdrop|modal|popover|tooltip|toast}Semantic z-index
.lp-z-{0|10|20|30|40|50|n1|auto}Numeric z-index