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

CSS jQuery Basics (2014) Creating a Mobile Drop Down Menu Perform: Part 3

ul 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

I 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 */".

thank you, this was my issue too :)

Ha, same here as well. Thanks, I was getting extremely annoyed :)

lower 320px to 180px

That does it! Thanks Michael!

or Just set max width 568px instead of min 320 and max 568

that did not work on mine. my code looks exactly like Stephen's.

I had the exact same issue. Using Chrome on Windows 7. Michael's solution worked for me. Thanks!

Thanks David! The comments were the issue for me and now it works perfect.

I made the same commenting mistake. Thanks, David. Excellent problem solving.

I am also having the same issue currently. I placed the correct commets also. Neither of my media queries are working.