Flex - position one element

Hi

I have a demo here - http://cssdeck.com/labs/meyr0401

I have a container with display flex which places both elements next to each other at the left side.

I can position both at the left, center or right but can I position the second element (three) on the right and have the first element ( One with a longer title) on the left with flex

Worked it out

http://cssdeck.com/labs/meyr0401

1 Like

Yes if you use a horizontal auto margin on a flex item it will take up all the available space and push the element as far left or right as it will go (depending on which side you place the auto).

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.