The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS I cant center the div Reply To: I cant center the div


Elements with display:inline-block act like text and are centered by applying text-align:center to their parent element.

However, since you are using flexbox, the display property you are using is essentially ignored and centering of that would be achieved by applying justify-content:center to the parent.