A
A
Artur Kudashev2019-04-17 20:02:08
css
Artur Kudashev, 2019-04-17 20:02:08

How to arrange pictures correctly?

Hello, I'm making a portfolio and I can't solve the problem. There is a layout:
5cb75b81cd3a4806458091.png
I decided to do it with Flexbox, but the block with a small image takes up all the free height.
5cb75bc72bc94563613088.png
I set a fixed height, but it did not help.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
tyzberd, 2019-04-17
@archi_kud

flex will not.
Use https://masonry.desandro.com/ or something similar https://ruseller.com/lessons.php?rub=32&id=2197
or grid, see there already or support
https://medium.com/@ andybarefoot/a-masonry-style-l...
https://codepen.io/balazs_sziklai/pen/mOwoLg
although if it doesn't change often, it can be done with flex. Two vertical columns, and in them a div with two pictures, then one large and one smaller

D
Dmitry Karpov, 2019-04-17
@dimonos33ru

Try to make the direction not in a row, but in columns
flex-direction: column

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question