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

Matt Bingham
seal-mask
.a{fill-rule:evenodd;}techdegree
Matt Bingham
Front End Web Development Techdegree Student 2,664 Points

columns not working

I think I have the code right, but not going to 3 columns. I feel I missed something when I closed down the tutorial last night and didn't save something!

CSS:

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

/******************************* TWO COLUMN LAYOUT *******************************/

#primary { width:50%; float:left; }

#secondary { width:40%; float:right; }

/******************************* PAGE: PORTFOLIO *******************************/

#gallery li { width:28.3333%; }

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

}

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

}

HTML:

<ul id="gallery"> <li> <a href="img/numbers-01.jpg"> <img src="img/numbers-01.jpg" alt=""> <p>Experimentation with color and texture.</p> </a> </li> <li> <a href="img/numbers-02.jpg"> <img src="img/numbers-02.jpg" alt=""> <p>Playing with blending modes in Photoshop.</p> </a> </li> <li> <a href="img/numbers-06.jpg"> <img src="img/numbers-06.jpg" alt=""> <p>Shapes and shit twelve.</p> </a> </li> <li> <a href="img/numbers-09.jpg"> <img src="img/numbers-09.jpg" alt=""> <p>Lets see if this works.</p> </a> </li> </ul>

1 Answer