Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML How to Make a Website Responsive Web Design and Testing Write CSS Media Queries

Tanya Torres
Tanya Torres
9,791 Points

What am I doing wrong?

I was asked to create a breakpoint for devices 480 pixels wide or larger. Inside of the breakpoint the h1 font-size needs to be set to 2.5 em. What am I doing wrong here??

Julian Gutierrez
Julian Gutierrez
19,201 Points

Can you please post your code?

Tanya Torres
Tanya Torres
9,791 Points

I apologize. I thought it attached the code automatically. Is there a way to attach it at this point?

But based on the question I'm thinking the syntax should be:

@media screen and(min-width: 480px) { h1{ font-size: 2.5em; } }

Correct? How am I possibly messing this up?

2 Answers

Julian Gutierrez
Julian Gutierrez
19,201 Points

There needs to be a space between "and" and the opening parenthesis.

@media screen and (min-width: 480px) { 
    h1{ 
         font-size: 2.5em; 
    } 
}
Tanya Torres
Tanya Torres
9,791 Points

Wow. Thank you so much.

Julian Gutierrez
Julian Gutierrez
19,201 Points

No problem, believe it or not missing spaces, semi-colons, brackets, and general mistyping happen more often than not even for experienced coders.

Tanya Torres
Tanya Torres
9,791 Points

Oh I believe that. I study Computer Science at my university. I decided to use this website to keep my skills sharp and learn new ones!