C
C
Cheizer2018-01-31 23:54:58
css
Cheizer, 2018-01-31 23:54:58

How to use FLEXBOX to make blocks vertically centered, BUT the same height?

Friends, patrons!! :))
Seems like a simple task, but I can't figure out how to solve it.
How to vertically center the blocks on flexbox, but make them the same height at the same time, this is necessary in order to press the picture in one of the blocks to the top. It doesn't work at all.
I made an example on codepin as it is now https://codepen.io/Cheizer/pen/BYNOJv
And here are the screenshots as it is now
5a722d044094d786664590.jpeg
and how you want
5a722d1909f13006726982.jpeg
How to do it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
kreotech, 2018-02-01
@Cheizer

Can be done like this

E
Egor Lavrenov, 2018-02-01
@EgorWeb

.flex-container{
align-items: flex-start;
}
Here is a detailed guide to flex

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question