Centered grid with different-sized children
I have this markup
This looks correctly to what I want, but the problem is that the grid is taking up too much space. I'd the two children of the grid to grow left/right, while the "center" of the grid is still in the center of the parent div.
So the result I'm looking for is the red box on the 2nd screenshot.
I'm unsure if this is achievable with a grid at all, or if it should be done with flex instead.
1 Reply
Tailwind Play
Tailwind Play
An advanced online playground for Tailwind CSS that lets you use all of Tailwind's build-time features directly in the browser.