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
Eric Washington
iOS Development with Swift Techdegree Student 21,884 PointsNeed Help with Adaptive Design Code Challenge Task (Implementing Media Queries) Question #2
I need some assistance with the second question on the Implementing Media Queries Code Challenge.
I have tried so many different sets of code and cant seem to find the right answer to save my life. Can someone please help me!?
Question:
Add the appropriate CSS code to the media query so that ".contact" and ".menu" fill the entire container width when the device or browser width is at most 480px wide.
Here is the code that I typed under the media query:
/* Mobile ----------- */
@media screen and (max-width : 480px) {
}
.contact {
width:100%;
}
.menu {
width:100%;
}
4 Answers
Kester Browne
24,414 PointsRemove the curly brace under the @media and place it at the end of the code.
Chase Lee
29,275 PointsYou need to place it inside your media query. To do that simply take the curly braket that is right under the beging of the query and put it at the bottom fo your declarations and values.
Stephen Whitfield
16,771 PointsLooked at the code for less than 5 seconds and noticed that curly brace which ended your code quicker than it could start! Happy the others have pointed it out. Good luck.
Woongshik Choi
42,387 PointsThanks! It helped me.
Eric Washington
iOS Development with Swift Techdegree Student 21,884 PointsEric Washington
iOS Development with Swift Techdegree Student 21,884 PointsThanks man! I didn't realize how simple it truly was.
Kester Browne
24,414 PointsKester Browne
24,414 PointsAnytime brother.