Why doesn't flexbox shrink to fit after wrapping elements? [duplicate]
问题 This question already has answers here : Make container shrink-to-fit child elements as they wrap (4 answers) CSS when inline-block elements line-break, parent wrapper does not fit new width (2 answers) Closed 10 days ago . I want to have a flex-box with a maximum width that wraps beyond that width, but that also fits the maximum size of any given "row" within the flexbox. The problem I am facing now is that any element that stretches beyond the maximum width and then wraps causes the flexbox