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 CSS Basics (2014) Enhancing the Design With CSS Adjusting the Layout with Media Queries

3 Answers

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,252 Points

Perhaps you could post your code directly to the forum?

@media screen and (max-width: 280px) {
     //styles go here
}

In the meantime the correct format for a media query is something like the above. It's like a programming condition statement in which styles are applied with the maximum width is in effect, that is when the lower than 281 pixels width in size.

@media (condition){

}
Stephen Gately
Stephen Gately
2,483 Points

Jonathan,

I'd like to but I am not sure how to post like you did. I've watched the treehouse videos for snapshotting and forking a workspace but when I post it just shows up as a link. How are you posting those? I took a screenshot and tried to drag into text box to no avail. A little embarrassed over here ...

Thanks in advance

I've attempted all the suggestions on here. Media Q's are still not working.