Balancing on a pivot with Flexbox
Let me show you a way I recently discovered to center a bunch of elements around what I call the pivot.
Let me show you a way I recently discovered to center a bunch of elements around what I call the pivot.
Flexbox promises to save us from the evils of plain CSS (like vertical alignment). Well, Flexbox's deliver on that goal. But mastering its new mental model can be challenging. So let's take an animated look at how Flexbox works, so we can use it to build better layouts.
The popular Flexbox model attempts to replace the giant pain known as CSS " floats ". Unfortunately, it also introduces yet another entirely new system into CSS. And you thought there were enough already! Actually, the grid-oriented nature of Flexbox makes much more sense than constantly juggling your "float" and "block/inline-block" values.