Forums

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

Home Forums Other First flexbox – how do I line up the images? Reply To: First flexbox – how do I line up the images?

#250857
shlbam
Participant

Here is my pen with what you want: https://codepen.io/shlbam/pen/YNaLgo

You were close.

In order for flexbox to work, the parent flex container needs children to work with. You seemed to have miss placed a div
and the second child (iconsSocial) was nested inside the child (iconsLogo). So your parent div (logoWrapper) was only affecting one child.

In your css you just needed to change it to:

justify-content: space-between;

and this will give you the split effect you are looking for.

You can picture flexbox working like this:
logoWrapper(parent)
—-iconsLogo(child)
—-iconsSocial(child)

And the parent has certain properties that effect the children.