Files
30-seconds-of-code/snippets/evenly-distributed-children.md
Isabelle Viktoria Maciohsek c5d68af0b5 Make expertise a field
2022-03-01 20:22:55 +02:00

788 B

title, tags, expertise, firstSeen, lastUpdated
title tags expertise firstSeen lastUpdated
Evenly distributed children layout intermediate 2018-02-28T13:47:02+02:00 2021-10-13T19:29:39+02:00

Evenly distributes child elements within a parent element.

  • Use display: flex to use the flexbox layout.
  • Use justify-content: space-between to evenly distributes child elements horizontally. The first item is positioned at the left edge, while the last item is positioned at the right edge.
  • Alternatively, use justify-content: space-around to distribute the children with space around them, instead of between them.
<div class="evenly-distributed-children">
  <p>Item1</p>
  <p>Item2</p>
  <p>Item3</p>
</div>
.evenly-distributed-children {
  display: flex;
  justify-content: space-between;
}