CodeHub

Flex – justify content: space-between fill white space

To get rid of the horrible spacing between the last two elements on a row of elements which are being aligned with

justify-content: space-between

… try the following:

.grid {
  display: flex;
  flex-flow: row wrap;
  justify-content: space-between;
}

.grid::after {
  content: "";
  flex: auto;
}