Answer the question
In order to leave comments, you need to log in
What properties are needed for blocks in flexbox?
There are block requirements:
max-width: 300px;
min-width: 200px
What properties need to be set for the blocks to make it work like this:
so that when blocks of 300px do not fit into a line, they decrease to 200, and then 1 block flies out and blocks in the line are again 300px each
Answer the question
In order to leave comments, you need to log in
Found the answer:
.container {
display:flex;
flex-wrap:wrap;
}
.block {
flex-grow: 1;
flex: 1 0 200px;// and you need to write the stretching exactly like this, and not separately flex grow and min-width, otherwise
max-width: 300px will not work;
margin: 10px
}
div{
display:flex;
flex-wrap:wrap;
}
div > div
{
max-width: 300px;
min-width: 200px;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question