A
A
Alexey102021-06-21 12:30:41
css
Alexey10, 2021-06-21 12:30:41

How to make a horizontal scroll of blocks in two rows?

How to make it filled with blocks only up to the second row (does not go to the third) 60d05c3f852ca553251727.jpeg, and then turn on the horizontal scroll? (blocks can be different sizes) Maybe there is a plugin, or js code, or just css there is an option.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Elena Fire, 2021-07-01
@BormotunJedy

Parent div

.parent-div {
display: flex;
}
.parent-div .first-line {
width: 100%;
height: [ровно по высоте строки с элементами]
}
.parent-div .second-line {
width: calc(100% + 100%);
height: [ровно по высоте элементов];
overflow: hidden;
overflow-x: scroll [или auto];
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question