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

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

Should the min and max widths of the different media queries by the same value?

It seems to me like a bad idea to set the max-width for hiding one menu and the min-width for hiding the other menu to the same value. Are these property values inclusive of the number entered. If so, at exactly 568px wouldn't both meet the criteria and both take effect resulting in neither menu being displayed? Or do media queries by nature only allow for one to be active at a time?

1 Answer

From what I have read, min and max actually mean greater than or equal to, and vice versa.

I pulled this directly from MDN

Media features Most media features can be prefixed with "min-" or "max-" to express "greater or equal to" or "less than or equal to" constraints. This avoids using the "<" and ">" symbols, which would conflict with HTML and XML. If you use a media feature without specifying a value, the expression resolves to true if the feature's value is non-zero.

hopefully that helps.