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 trialJustin Lubenow
918 PointsI can't get the 2 columns to appear anymore. I am only seeing 3 columns even when screen is sized to smallest setting.
here is the responsive.css
/If page is not a screen (e.g. print screen) or smaller than 480px, than this won't apply portrait mode of phone/
@media screen and (min-width: 480px) {
/************************************* TWO COLUMN LAYOUT *************************************/
#primary { width: 50%; float: left; }
#secondary { width: 40%; float: right; }
}
/************************************* 3 * 5 = 15 100% - 15% = 85% 85 / 3 = 28.3333333 *************************************/
/************************************ PAGE: PORTFOLIO *************************************/
#gallery li { width: 28.3333%; }
#gallery li:nth-child(4n) { clear: left; }
/landscape mode of phone/
@media screen and (min-width: 660px) {
}
2 Answers
Youngchul Kim
4,258 PointsThe issue is that you are closing the media query off after the #secondary. Try to remove the closing curly bracelet and see if it works. I made the same mistake as yours but fixed after looking at this post.
@media screen and (min-width: 480px) {
#primary { width: 50%; float: left; }
#secondary { width: 40%; float: right; }
} <--- MOVE THIS TO THE BOTTOM STACK. THIS IS CLOSING OFF YOUR MEDIA QUERY.
#gallery li { width: 28.3333%; }
#gallery li:nth-child(4n) { clear: left; }
Justin Lubenow
918 PointsYoungchul - thank you so much!! That fixed it. I now have a truly responsive experience for phone, tablet/desktop.
Ted Sumner
Courses Plus Student 17,967 PointsTry switching your media queries to max-width from min-width.
Justin Lubenow
918 PointsJustin Lubenow
918 Points<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Senior Advisors | Medicare Experts</title> <link rel="stylesheet" href="css/normalize.css"> <link href='http://fonts.googleapis.com/css?family=Changa+One|Open+Sans:400italic,700italic,400,800,700' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="css/main.css"> <link rel="stylesheet" href="css/responsive.css"> </head> <body> <header> <a href="index.html" id="logo"> <h1>Senior Advisors</h1> <h2>Helping you navigate the journey ahead.</h2> </a> <nav> <ul> <li><a href="index.html" class="selected">Educational Videos</a></li> <li><a href="about.html">About Us</a></li>
<li><a href="contact.html">Contact Us</a></li>
</ul> </nav> </header> <div id="wrapper"> <section> <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>Trying to create an 80's style of glows.</p> </a> </li> <li> <a href="img/numbers-09.jpg"> <img src="img/numbers-09.jpg" alt=""> <p>Drips created using Photoshop brushes.</p> </a> </li> <li> <a href="img/numbers-12.jpg"> <img src="img/numbers-12.jpg" alt=""> <p>Creating shapes with...</p> </a> </li>
</body> </html>