2024-06-19
3109
#css
Ibadehin Mojeed
112227
Jun 19, 2024 ⋅ 11 min read

How to create a responsive image gallery with CSS flexbox

Ibadehin Mojeed I'm an advocate of project-based learning. I also write technical content around web development.

Recent posts:

Gemini CLI vs Codex CLI: A Comparative Analysis

Does Gemini CLI fall short? Here’s how Codex compares

Compare Codex CLI vs Gemini CLI for real-world coding tasks. See strengths, weaknesses, and which AI CLI fits your developer workflow best.

Emmanuel John
Aug 20, 2025 ⋅ 8 min read
Is Next.js Still Developer-Friendly?

Is Next.js still developer-friendly?

The question isn’t whether Next.js is good or bad; it’s whether the productivity gains are worth the complexity tax.

Chizaram Ken
Aug 20, 2025 ⋅ 5 min read
Don’t Let AI Erase The Next Generation Of Dev Leaders

Don’t let AI erase the next generation of dev leaders

As AI tools take over more routine coding work, some companies are cutting early-career dev roles — a short-sighted move that could quietly erode the next generation of tech leaders if we aren’t careful.

Jack Herrington
Aug 19, 2025 ⋅ 6 min read
Nuxt 4.0 Is Here: What’s New And What To Expect

Nuxt 4.0 is here: What’s new and what to expect

Learn what’s new in Nuxt 4, from the app/ directory to TypeScript improvements and data fetching changes. Plus, tips for a smooth migration.

Ikeh Akinyemi
Aug 19, 2025 ⋅ 4 min read
View all posts

6 Replies to "How to create a responsive image gallery with CSS flexbox"

  1. Excellent article! I’m using the pointers here in my own project. I found that since the text over the images is only visible on rollover, they are not visible on a mobile device, so I’m just putting the text over the image and the color overlay so it’s visible at all times.

  2. I think there’s a typo in the Making it Responsive section where you have set –gallery-items-per-row to 3 for width between 540px and 768px. I think you meant that to be 2?

Leave a Reply