Next.js + Tailwind: how to make images be uniform
I don't know how could I make them have the same height or aspect ratio.
This is my whole component:
5 Replies
i never used talwind nor next but i can give u da idea here
the easiest way would be in the case where u have images of different aspect ratio, what u can do is yse a div for image holder, give it a fixed height and width that u want the images to be then give the images
doing so the images will zoom or shrink to fit the div
excellent advice, thanks a lot, it worked!
Careful with heights, and test it at different breakpoints too. I would actually recommend an aspect-ratio instead with the object for cover.