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 dont know where i have gone wrong but i cant seem to split the gallery into three columns

@media screen and (min-width: 480px) {

/************************** two column layout **************************/

primary {

width: 50%; float: left; }

secondary {

width:40% ; float: right; }

/************************** PAGE: PORTFOLIO **************************/
#gallery { width: 28.3333%; } }

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

@media screen and (min-width: 650px) { }

3 Answers

Hi Harrison,

You do need to close off your 480px media query right before the 650px one. As it stands right now, your :nth-child css is not in the 480px media query.

Your main problem though is that you need to apply the 28.3333% width to the list items and not to the unordered list.

#gallery li {
    width: 28.3333%;
}

Also, take a look at the Teacher's Notes below the video. There's been an update to the nth-child expression. It should be 3n + 1, not 4n.

thanks mate!!! works a beaut

You have an extra "}" after #gallery

Natalia C.
Natalia C.
2,027 Points

Which (the "extra "}" after #gallery" adamtatusko mentioned) should be before your second @media query