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 Responsive Web Design and Testing Build a Three Column Layout

When I adjust my window size small or large, the pictures stay 3 in the top row, 2 in the bottom. How to shuffle them??

I'm doing the How to Make a Website course and I have followed Nick Pettit and made a Designer portfolio page with 5 images. Whenever I adjust the size of the browser window, the pictures never move. They resize, but they don't readjust in order. Am I doing something wrong?

5 Answers

Sergey Podgornyy
Sergey Podgornyy
20,660 Points

I suggest you to add the following CSS rule:

#gallery li:nth-child(3n+4){
    clear: left;
}

Also I suggest you to learn this course https://teamtreehouse.com/library/responsive-layouts and this one https://teamtreehouse.com/library/css-selectors

Sergey Podgornyy
Sergey Podgornyy
20,660 Points

I suggest you to learn CSS Selectors, and especially Advanced Selectors