Gaps in a grid make an element of the grid overflow
As you can see, the grid which contains the image and the div with 2 text blocks has some gaps, and for this reason text overflows. Any idea how can I prevent it?
6 Replies
share your code 🙂 check out #how-to-ask-good-questions for some tips on how to do that most efficiently
Oh right
I'll send a screenshot too, I think this way it's easier to read code
screenshots of code aren't as useful, can't copy paste them. The best solution is something live like on codepen or the tailwind playground
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.
Ok I found a solution
Instead of
grid-cols-[52%_48%]
, grid-cols-[52fr_48fr]
is better
since it uses the amount of free space, instead of the whole size of the grid