Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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/