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 Sass Basics (retired) Advanced Sass Concepts Working with Media Queries

Steve Leichman
Steve Leichman
7,008 Points

Sass Nesting @Media Query Coding Challenge Help

So I'm supposed to: Open a scope on an <ul> with the ID menu. Inside that, open a scope on a <li> element. Using Sass nesting, add a media query so that the <li> elements will have an attribute of text-align: center when the media is screen and the <li> has a max-width of 500px.

I have: '''

@media screen and (orientation:landscape){ img{width: 360px;} }

ul #menu{ li{ @media screen(max-width: 500px){ text-align:center; } } } '''

My error message is that Task 1 (setting the @media screen to landscape with img width of 300px) is no longer passing. Hampton Catlin , Guil Hernandez , anyone...thoughts?



3 Answers

I think that the question wording is a little misleading. You can omit the <ul> and just start your scope at #menu.

Steve Leichman
Steve Leichman
7,008 Points

I realize I left the "and" out of the second media query, but even so I'm still getting an error message that I'm not assigning the media query to the list item... ''' @media screen and (orientation:landscape){ img{ width: 360px; } }

ul #menu{ li{ @media screen and (max-width:500px){ text-align:center; } } } '''