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 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