#Flexbox Question

4 messages · Page 1 of 1 (latest)

wraith plank
#

Does flexbox make the child elements inside the container inline? I'm confused on how these text elements are restricted just by adding align-items: center.
I know that flex defaults to stretch... is that the answer to this question?

valid pilot
#

Try without "flex-direction: column"...

undone cairn
#

Yes, that's the answer. Default is stretch along the cross-axis - which is the row since you're flex-direction: column. By changing them to align-items: center you're removing the stretch and then placing them center which ALSO makes them their "natural" width.

wraith plank
#

wow that clears it up a lot. thank you!!