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

CSS

How to get Item 4 to not fully stretch?

Ok, I am trying to think of this video as an example on a way I make a portfolio gallery later on. There is a point when the Item 4 breaks to the next line and gets all the width of the container. How would I get items to go align to the left until I fill 2 or 3 item per row?

Thank you for reading.

Not really following Daniel. Could you perhaps show a working example you might've seen somewhere or illustrate it with picture or something?

2 Answers

try setting the pictures width and use a % value but have some margin between all the pictures... perhaps that picture is not given the class or id

Thank you for you answer Trent Christofferson!

Christian Andersson i am sorry for not seeing this before. But i was trying to achieve something like this type of gallery (link below).

https://cdn1.freshdesignweb.com/wp-content/uploads/2013/12/18augst-Flat-Responsive-Portfolio-Gallery.jpg