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

Any idea why this media query isent working because i have none

so am trying to get this media query to work but it dosent seem to be working

@media screen and (device-width: 360px) and (device-height: 597px) and (-webkit-device-pixel-ratio: 3) { #main { padding-left: 50px; margin-left: 150px; }

footer {
    width: 1419px;
}

}

http://imgur.com/gallery/pOuRkL9/new

2 Answers

Instead of a range you pinpointed the exact width and height of a device:

@media screen and (device-width: 360px) and (device-height: 597px) 

So your media query only kicks in at the exact measurements you provided: a device with a width and height of 360x597px.

try this:

@media screen and (min-device-width: 360px) and (min-device-height: 597px) 

or

@media screen and (max-device-width: 360px) and (max-device-height: 597px) 

Thanks That Worked for me