🍱 Bento Grid with TailwindCSS (Need help with grids!)

Solution retrospective
<img>
Tag
I used to place images as backgrounds instead of using the <img>
tag 🙈 — it felt easier to position them that way.
However, that approach actually brings more problems than benefits ⚠️. It often leads to poor responsiveness and accessibility issues.
Now, I use the standard <img>
tag 🧩 so images adapt properly to the container 📐.
To crop any overflow, I apply overflow: hidden;
✂️ for a clean layout.
When I started, I thought calculating the rows and columns would be easier 🤔 — and maybe it actually is.
But I ended up doing something I'm not entirely proud of 😅.
My management of rows and columns in the grid layout isn't the best 🎛️, though I believe the final result is still acceptable ✅.
I'd love some help with the grid layout 🧩. I know there must be a more precise and effective way to handle it — both for the desktop and mobile versions 📱💻.
I'm open to suggestions whether it's with pure CSS or Tailwind CSS ✨. Any guidance on improving the structure and responsiveness of the grid would be greatly appreciated! 🙌
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on EFEELE's solution.
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord