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

Charlie Bradley
Charlie Bradley
17,935 Points

How do i hide my select menu with css?

So I can't seem to be able to hide my select menu when I increase the size of my screen. Using a media query, I am having no trouble hiding the navigation element. However, as I increase the size of the browser, the nav element appears and my select menu continues to appear on the screen. Here's what I have tried...

@media (min-width:568px) {
     #menu select {
          display: none;
      }
}

Thanks for the help!

2 Answers

Your CSS looks appropriate; it may be a problem with your HTML. Make sure your element has the appropriate ID for the select container.

Also check to make sure your @media query is at the bottom of the css document. It's possible the display attribute is set to a different value later in the code, and to avoid conflicts you can usually move your media queries to the end of your file.

Charlie Bradley
Charlie Bradley
17,935 Points

Well, I double and triple checked and everything looked in place so I just scraped it and started over. It works now!!! No idea why but thank you for the help!