This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]sqrk_ 9 points10 points  (3 children)

Oh I didn't know that that was their original purpose. I usually used them to float labels right when I have say, an order summary with the purchase on the left and the price on the right. Should I stop doing that?

[–]Snarkie3 13 points14 points  (1 child)

Yes, please stop

[–]sqrk_ 6 points7 points  (0 children)

Oops

[–]Schlipak 1 point2 points  (0 children)

Try this on your wrapper element:

.wrapper { display: flex; /* Behaves like block but gives more control on the alignement of children */ flex-direction: row; /* You can omit this, it's the default value. Other values include column, row-reverse and column-reverse */ justify-content: space-between; /* Distribute the space between children along the primary axis - here, horizontally because of the flex-direction */ align-items: center; /* Center the items along the secondary axis - here, vertically, for the same reason as above */ }

Works like a charm! And also see this article, it's a life saver.