A
A
Alexander Shishkin2017-04-18 13:45:05
css
Alexander Shishkin, 2017-04-18 13:45:05

How to make a grid ala Pinterest with horizontal arrangement of elements?

Good afternoon. The bottom line is that you need to make a grid a la pinterest, so that the elements are pulled up in height. I found a solution on the Internet through the use of column, but all these solutions have one drawback that I have not yet been able to overcome, namely, that the elements inserted into HTML are not arranged from right to left, but one under the other.
That is, not like this:
1 2 3
4
but something like this:
1 4
2
3
Is there any way to solve this problem, preferably without JS.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander Pushkarev, 2017-04-18
@AXP-dev

Through columns .
On Pinterest just through js and done

A
Alexander Aksentiev, 2017-04-18
@Sanasol

masonry is called grid a la pinterest

P
Polina Emelyanova, 2017-04-18
@bugo_aneo

try column-count on parent and children inline-block. So such a "masonry" is done .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question