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
Jianhua Li
1,839 PointsStuck on the Challenge task 2 of 3
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.
Have no ideal how to start. In the challenge only show the index.HTML file. Isn't this should write in style.css file?
5 Answers
Nachiket Kumar
3,590 PointsThere is a tab next to the index.html that says style.css. You will need to click that and then enter the css.
Jianhua Li
1,839 PointsThanks, Nachiket. No style.css tab shows up.
Nachiket Kumar
3,590 PointsYou dont see something like this?
Jianhua Li
1,839 PointsNo CSS tab, But I solved it by code:
@media screen and (max-width : 480px) {
.contact{
width:100%;
}
.menu{
width:100%;
}
}
Thanks a lot, Nachiket!!
Nachiket Kumar
3,590 PointsWhere did you put this code? It has to go in a css file by my understanding, unless you put it in the <head> section of the HTML file?
Jianhua Li
1,839 PointsThat is what I thought. But it can be wrote in index file which I am confusing too. Anyway, I went through the challenge. Hahah..
