To center an element using flex you don't have to do .child { margin:auto }
You can use what flexbox gives us and use justify-content like this
.parent { display: flex; justify-content: center; }
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
To center an element using flex you don't have to do .child { margin:auto }
You can use what flexbox gives us and use justify-content like this
.parent {
display: flex;
justify-content: center;
}