Answer the question
In order to leave comments, you need to log in
How to prevent display:flex content from stretching?
Please help, I ran into such a problem
. Avatars stretch the content, which causes the bottom scroll to appear, put the avatars themselves in the display: flex container and center alignment, as the customer said that the avatars would appear from the center.
Previously, I also encountered this problem, but then it was solved by overflow: hidden on the parents, this time it doesn’t work because the parent has a shadow.
Actually, the question is, how to disable content stretching for display: flex?
Page for clarity https://profi.ngens.ru/unk/dist/index.html
Answer the question
In order to leave comments, you need to log in
Well, considering that by default the display is flex - but-wrap, then everything is right. there are 2 options:
1. put a wrap on the parent and dump the children
2. this line is generally just like a gallery and there is no new line on the minimum and it will be just either a custom scroll or left / right arrows
First you need to decide how exactly the line should look if the elements do not fit. I see several options here:
1. Move to a new line, center the new line
2. Move to a new line, but align to the left, if the content is not enough for 2 lines - align to the center
3. Display only what fits into the line
4. Scroll .
From this and dance
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question