Answer the question
In order to leave comments, you need to log in
How to center an inline-flex container?
Friends, I can't figure out how to position the container itself in the center of the page?
Setting the inline-flex property to a container aligns it to the left edge. And it should be in the middle.
Maybe there is another solution?
The problem is that I need to wrap this container with colored borders so that I get a kind of block in the center of the page.
Thank you.
Answer the question
In order to leave comments, you need to log in
Give the wrapper property text-align: center;
in this case flexbox behaves like an inline element
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question