A
A
Arthur Levenson2020-10-08 15:26:32
Flexbox
Arthur Levenson, 2020-10-08 15:26:32

How to align flex items horizontally?

How to align flex items horizontally? To get it like this: 5f7f053bd3a50195799685.png

I'm trying to use the flex-direction: row property, but for some reason it does not help achieve the desired result.

https://codepen.io/kiskiskit/pen/QWEWRrx

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Arseny, 2020-10-08
@kiskiskit

Use the flex-line property align-items: centeror on the child element align-self: center. Works for both rows and columns.
It will not work on nested elements (picchi in this case), this will require a little more tricks.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question