0

Can the spacing of child elements extend automatically while I stretch the page.If I use justify-content: space-around at the father element.The second line of the child elements's gap is not the same as the first line.Can it be automatic line break and automatically extend the spacing of child elements at the same time?

.contain {
  display: flex;
  flex-wrap: wrap;
  // justify-content: space-around;
}
.contain div {
  background: black;
  width: 200px;
  height: 200px;
  margin: 10px;
}
<div class="contain">
  <div></div>
  <div></div>
  <div></div>
  <div></div>
  <div></div>
  <div></div>
  <div></div>
  <div></div>
<div>
suedar
  • 130
  • 10
  • 1
    If you are setting height and width for your items you should use the display: grid – Joe Koker Mar 13 '19 at 09:42
  • if the issue is the *spaces in the last row* refer [this](https://stackoverflow.com/questions/54648178/wrapping-flex-items-in-the-last-row-css-grid-to-the-rescue) and especially [this](https://stackoverflow.com/questions/42176419/targeting-flex-items-on-the-last-row) – kukkuz Mar 13 '19 at 11:22

0 Answers0