D
D
danilr2019-02-26 06:09:49
css
danilr, 2019-02-26 06:09:49

How to arrange blocks in columns of 5 pieces?

I hung over such a problem - there is a dynamic number of blocks, you need to arrange them 5 pieces in a column, the next ones go to the next column and so on. PS This is a menu block with an absolute list, if that matters. 5c74add72b591539497883.png
I'm trying to do so

.menu-block{
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
}
.items{
height: 20%;

5c74b2ec0ce7b777340304.png
This one almost works, but for some reason the block does not expand as much as it should, please help, what is the error?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Spaceoddity, 2019-02-26
@danilr

So?
https://codepen.io/nanto-work/pen/eXYLwz

J
Jupiter Max, 2019-02-26
@vardoLP

look at the blue block in the styles, the width is probably indicated. If it is specified, the block will not stretch

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question