0

I'm using a column wrap layout, and the page is going to load new content and append them as new children elements to the parent box element, so I hope the box width auto fit to the children elements.

Codes here: https://codepen.io/mashirozx/pen/exgRqV

What it looks now: enter image description here

My hope (Notice the overflow-x bar): enter image description here


Problem solved:

Adding overflow: auto to the flex box.

Mashiro
  • 1,032
  • 1
  • 12
  • 24

1 Answers1

0

Try to change:

flex-container-content > div {
  background-color: #EB213C;
  width: auto;
  margin: 10px;
  text-align: center;
  line-height: 75px;
  font-size: 30px;`

enter image description here

Angelotti
  • 673
  • 1
  • 6
  • 20