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

I have checked my code many many times now, yet my layout doesn't go from 3 to 2 columns when I decrease my screen size?

I have just done what he did in the video but i get 3 columns no matter which size my screen are.

Jonathan Dewitt
Jonathan Dewitt
8,101 Points

You need to show us your code or we can't really help bud.

3 Answers

Jonathan Dewitt
Jonathan Dewitt
8,101 Points

In your examples you are missing the pound sign in front of all your gallery selectors

#gallery { ... }
#gallery li { ... }
#gallery li:nth-child(4) { ... }

my responsive line of code looks as following :-

gallery li {width:28.3333%;}

gallery li:nth-child(4) {clear:left;}

the line of code in my main.css looks like following:-

gallery {

margin:0;
padding:0;
list-style:none;} 

gallery li {

float:left;
width:45%;
margin:2.5%;
background-color:#f5f5f5;
color:#bdc3c7;

}

ohh, thanks :) never mind :) i just saw that i forgot the last closing bracket in my first @media :) everything is fine now :)