V
V
ViT932020-09-30 10:45:11
css
ViT93, 2020-09-30 10:45:11

How to move a product card to a new line and scale all cards to fill the freed space?

Hello!
How to fill the remaining space on the right after transferring the card, while ensuring that all cards are the same size? I am interested in the solution exclusively with flexbox, since I know how to use viewports)
5f743624190da859291444.png

This method is not suitable, since the last 2 cards are clearly larger

.cards {
  display: flex;
  flex-wrap: wrap;
}
.cards__item {
    margin: 10px;
    flex: 1 1;
    min-width: 250px;
}


5f74371518fab619070016.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
ReActor Dmitry Vershansky, 2020-09-30
@HunteR-VRX

Greetings.
I can suggest an implementation within the Grid.
Function auto-fill, propertiesgrid-template-columns

Y
Yuri, 2020-09-30
@cheeroque

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question