DEV Community

Discussion on: Never make your text container a flexbox container

Collapse
thomastamour profile image

Just found out about float: right to align content today (-_-')
Where I always added flex to the parent container. So with float right / center text / margin-left:auto margin-right:auto I guess where all good without flexbox to center items on the y-axis ๐Ÿ’ก๐Ÿค™

Collapse
mamlukishay profile image
Ishay Mamluk • Edited

Good luck with that ;)
Thatโ€™s exactly the kind of stuff flex allows you to get away with in an elegant, and most important, a robust way

Collapse
thomastamour profile image

I think my comment may've came as misleading; Just pointing out few code one-liner centering solutions for single element.

I just can't bare the idea of having overload of errthang "weird flex...but okay" situations where your html is a bloat of nested divs.

Still thanks for the feedback ((:

Collapse
katylava profile image
katy lavallee

Wait what? This is how we did things before flexbox and it was a nightmare.

Some comments have been hidden by the post's author - find out more