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

CSS

Images stay in two columns

Images won't display in 3 columns when browser is enlarged.

Responsive 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(3n+1) { clear: left; }

/*********************************************** PAGE: ABOUT ***********************************************/

.profile-photo { float: left; margin: 0 5% 80px 0; }

}

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

/*********************************************** HEADER ***********************************************/

nav { background: none; float: right; font-size: 1.125em; margin-right: 5%; text-align: right; width: 45%; }

#logo { float: left; margin-left: 5%; text-align: left; width: 45%; }

h1 { font-size: 2.5em;
}

h2 { font-size: 0.825em; margin-bottom: 20px; }

header { border-bottom: 5px solid #599a68; margin-bottom: 60px; }

}

HTML

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Kristi Mingal | Designer</title>
<link rel="stylesheet" href="css/normalize.css"> <link href='http://fonts.googleapis.com/css?family=Josefin+Sans:400,700,400italic,700italic' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="css/main.css"> <link rel="stylesheet" href="css/reponsive.css"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> </head> <body> <header> <a href="index.html" id="logo">
<h1>Kristi Mingal</h1> <h2>Designer</h2> </a> <nav> <ul> <li><a href="index.html" class="selected">Portfolio</a></li> <li><a href="about.html">About</a></li> <li><a href="contact.html">Contact</a></li> </ul> </nav> </header>

<div id"wrapper"> <section> <ul id="gallery"> <li> <a href="numbers-01.jpg"> <img src="img/numbers-01.jpg" alt=""> <p>Experimentaion with color and texture.</p> </a>
</li> <li> <a href="numbers-02.jpg"> <img src="img/numbers-02.jpg" alt=""> <p>Playing with blending modes in Photoshop.</p> </a>
</li> <li> <a href="numbers-06.jpg"> <img src="img/numbers-06.jpg" alt=""> <p>Trying to create an 80"s style of glows.</p> </a>
</li> <li> <a href="numbers-09.jpg"> <img src="img/numbers-09.jpg" alt=""> <p>Drips created using Photoshop brushes.</p> </a>
</li> <li> <a href="numbers-12.jpg"> <img src="img/numbers-12.jpg" alt=""> <p>Creating shapes using repetition.</p> </a>
</li> </ul> </section> <footer> <a href="http://"twitter.com/kbhm1850"><img src="img/twitter-wrap.png" alt="Twitter Logo" class="social-icon"></a> <a href="http://"facebook.com/kristina.mingal"><img src="img/facebook-wrap.png" alt="Facebook Logo" class="social-icon"></a> <p>Ā© 2015 Kristi Mingal.</p> </footer> </div>
</body>
</html>

2 Answers

I forgot the s in responsive! It's too easy to rely on spell check.

Cat Carbonell
PLUS
Cat Carbonell
Courses Plus Student 8,899 Points

You closed your media query a bit early on line 11 , which makes the CSS after (your PORTFOLIO section) kind of lost in a void. Also, you'll need to add your third column/section, give it an id, and adjust the width percentage under the TWO COLUMN LAYOUT section in order to fit the third column into your layout.

You should go back into your HTML and split your sections into the corresponding IDs found under the TWO COLUMN LAYOUT section.

CSS should look like this:

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

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

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

#secondary { width: 33.3%; float: left; }

#tertiary { width: 33.3%; float: right;}

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

#gallery li { width: 28.3333%; }

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

/*********************************************** PAGE: ABOUT ***********************************************/

.profile-photo { float: left; margin: 0 5% 80px 0; }

}

Although you should also adjust the IDs and width percentages to your preferences. Hope that helps!

I tried this but it didn't change anything