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 trialrui Paz
3,111 Pointsul not disappearing with media queries
Hi guys, so basically as far as I understood the code all looks the same as Andrew's .
However Im stuck in the early part of the video, since when the media queries were applied the select and button did disappear and appear correctly but did not take place of ul when in reduced widths.
@media (min-width: 320px) and (max-width: 568px){
#menu ul {
display:none;
}
}
@media (min-width: 568px) {
#menu select, #menu button {
display:none;
}
}
8 Answers
David Laycock
2,988 PointsI ran into this issue as well. It took me a little while but I eventually figured out that my commenting in the CSS file was the incorrect format using "// Comment here" instead of the CSS commenting of "/* Comment Here */".
Michael Singleton
6,253 Pointslower 320px to 180px
Stephen Ford
2,836 PointsThat does it! Thanks Michael!
Volodymyr Boretskyi
9,094 Pointsor Just set max width 568px instead of min 320 and max 568
Matthew Fenton
6,331 Pointsthat did not work on mine. my code looks exactly like Stephen's.
John Barhorst
9,648 PointsI had the exact same issue. Using Chrome on Windows 7. Michael's solution worked for me. Thanks!
Daniel Rotenberg
8,646 PointsThanks David! The comments were the issue for me and now it works perfect.
Lawrence Schoch
8,174 PointsI made the same commenting mistake. Thanks, David. Excellent problem solving.
Pramodini Kurnala
4,875 PointsI am also having the same issue currently. I placed the correct commets also. Neither of my media queries are working.
Mohamed Nabih
11,416 PointsMohamed Nabih
11,416 Pointsthank you, this was my issue too :)
Tommy Duquette
10,101 PointsTommy Duquette
10,101 PointsHa, same here as well. Thanks, I was getting extremely annoyed :)