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 trialDavid Potts
3,864 PointsWhat's the best way to get the gallery list items to be equal height?
Nick seems to have paragraphs that all line up neatly with two lines of text on mobile - but what if some paragraphs are longer than others? This extends the height of the li, which messes with the alignment of the gallery.
My usual way of doing this would be to set a min-height in pixels on the li:
<code>
gallery li {
float: left;
width: 45%;
margin: 2.5%;
min-height: 200px;
background-color: #f5f5f5;
color: #bdc3c7;
} </code>
I know that frameworks like Foundation have an equalize class that helps set equal height - but is there a "correct" way of doing it in a scenario like this?
1 Answer
Caleb Kleveter
Treehouse Moderator 37,862 PointsDoes this video answer your question. It's at about 8:20.
David Potts
3,864 PointsDavid Potts
3,864 PointsAbsolutely. I guess I was getting ahead of myself. Thanks!