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

Veronica Jimenez
PLUS
Veronica Jimenez
Courses Plus Student 1,357 Points

media queries dont work

/* Write your SCSS code below. */

img {

@media screen (max-width:480px) and (orientation:landscape) {

    width: 360px;
}

}

5 Answers

Austin Barber
Austin Barber
2,015 Points

Yes Veronica, Nick is right. The img goes within the the media query, always. I wish there was some way to friend each-other just so I could continue to give you a hand. I will keep an eye on the forums for you if you have any more questions I will be on all night. Don't have a quarter the treehouse points ole Nick up there has but I am a CSS programmer by profession and I am always glad to help. Also media queries will become some of your best friends in the future if you pursue this path; so learn to love them; and I promise that they do work!

Good luck!

Veronica Jimenez
PLUS
Veronica Jimenez
Courses Plus Student 1,357 Points

Weird thing is that keeps saying I got a compilation error ... tried @ nicolas's answer .. maybe its a bug who knows

Hi Veronica!!! Did you fix the problem? I think Nicholas' answer is right... Pero creo que olvidó poner "and" después de screen y antes de (max-width:480px). I think the media query is something like this: @media screen and (max-width:480px) and (orientation: landscape){ }