DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Discussion on: Tip #1 : Centering elements without flexbox and automatic margins

Collapse
koczkadavid profile image
David Koczka • Edited on

I'd stick with flexbox, it's the best choice for now. Using absolute positioning can introduce more bad things, than good.

EDIT:
Here's a neat little game, which can teach you flexbox in no time.
flexboxfroggy.com

Collapse
gablaroche profile image
Gabriel Laroche Author • Edited on

Yes I agree, but this is meant for situations where flexbox doesn't work, it's pretty rare but it happens. This method is more of a last resort than "use this intstead of flexbox and automatic margins". I'll add a little note to the post.

EDIT : It's particularly useful for centered absolute pseudo elements.