Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML How to Make a Website Styling Web Pages and Navigation Style the Image Captions

How to manage captions of different lengths?

Particularly in the mobile view, when I have captions of different character lengths (i.e. some break to two lines and some to three), I end up with blank spaces in my two column grid. Is there a good way to apply CSS to make all image and caption sets have the same consistent spacing, regardless of how long the paragraphs are in the captions?

Andrew Hunt
Andrew Hunt
7,665 Points

Have you tried justifying the content of the container? That might help (from CSS-tricks at https://css-tricks.com/snippets/css/a-guide-to-flexbox/)

.container { justify-content: center | space-between | space-around; }

Thanks Andrew. I'm not exactly sure how I would implement that in my CSS. I tried adding it in, around where my #gallery rules are and it didn't really do anything. I'm new to treehouse, so I am not sure how to show you my workspace... I'm in the course "How to Make a Website". http://port-80-2ut6s8vv1w.treehouse-app.com/