DEV Community

Vincent Engelmann
Vincent Engelmann

Posted on

3

Flexbox Item Stretching, Oh My!

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">
          <button>Edit</button>
          <button>Delete</button>
        </div>

Ain't no shame in StackOverflow Driven Development.

https://stackoverflow.com/a/33887124/1258020
https://tailwindcss.com/docs/flexbox-align-items

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay