D
D
Denis2016-04-21 14:48:39
css
Denis, 2016-04-21 14:48:39

Wrapping issue in flexbox?

Good afternoon. I'm asking for help with this issue. There are regular blocks inside a flex container (3 columns, 2 rows). Block sizes are given as a percentage.
Example: codepen.io
Question:
- how do I make blocks wrap to a new line without media queries?
(I had an idea to use some kind of "wall" with a fixed min-width, but it seemed to me not a very flexible option)
- and in general, is it worth using fixed values ​​for flex elements if responsive design is supposed to be?
I'm sorry if the questions seemed "atatata Google knows, but you don't"

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Goryachev, 2016-04-21
@BehemothOz

.item{
  width: calc(800px / 3);
}

But in general, media queries are better.
They are designed to be used.

A
Artem, 2017-11-16
@Artemey

You can specify min-width, then blocks will be wrapped on smaller monitors.
If you specify flex proportions, then the wrapped blocks will stretch to fit the screen.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question