Grid alignment inconsistency
Hello. I have 4 cards in a grid. As you can see in the image, the 2nd one got a little bigger due to the extra line. To remove the consistency, I am hoping to make other cards extend as well but I am unable to. Please guide me.
Code:

16 Replies
you have to do the tailwind equivalent of
grid-template-rows: 1fr
You mean grid-rows-1?
i have absolutely no idea
but looks like it
Nope same result
where did you put it?
<div className="grid grid-cols-4 gap-3 mt-18">
Here
and which element has the background?
Background?
This is the code
yes, the black background
<div className="bg-neutral-950 flex gap-x-4 p-5">
Right below the image
how about you set it on the parent?
on the first div inside the map?
Never mind
did the job
where?
<div className="bg-neutral-950 flex flex-1 gap-x-4 p-5">

now the question is "why it works?" 🤔