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 trialCRYSTAL YONG
1,523 PointsThere is a problem with my mobile menu.
The #menu ul {display: none; } does not seem to be disappearing when I decrease the screen size.
CRYSTAL YONG
1,523 PointsYes, I have already applied it.
@media (min-width: 320px) and (max-width: 568px) { #menu ul { display: none; } }
@media (min-width: 568px) { #menu select, #menu button { display: none; } }
2 Answers
sboussacsou
Courses Plus Student 7,450 PointsTry this,
I hope that will work for you
@media screen and (min-width: 320px) and (max-width: 568px) {
ul#menu { display: none; }
}
@media screen and (min-width: 320px) and (max-width: 568px) {
ul#menu { display: none; }
}
In your body you should have something like the following code :
<ul id="menu" >
<li>menu1</li>
<li>menu2</li>
</ul>
Emma Davis
4,760 PointsWhy not just remove the min-width: 320px as otherwise it will still display on screen sizes smaller than that (so isn't really required anyway)
sboussacsou
Courses Plus Student 7,450 Pointssboussacsou
Courses Plus Student 7,450 Pointsdid you apply the responsive conditions ?