CSS 3 · Flexbox

Lay out items in a row with spacing

Place children side by side with a gap between them.

.row {
  display: flex;
  gap: 1rem;
}

Official CSS 3 documentation

More flexbox commands

All flexbox commands · CSS 3 cheatsheet

Was this page helpful?