DEV Community


Flexbox Item Stretching, Oh My!

Vincent Engelmann
I'm a full stack developer and teacher.
・1 min read

To stop an item from stretching vertically in a flexbox container, apply this to the container: align-self: flex-start;.

In tailwindcss, this would be class="items-center" (or any of the other items-{position} classes). Here's a tailwind example:

        <div class="flex items-center">

Ain't no shame in StackOverflow Driven Development.

Discussion (0)

Forem Open with the Forem app