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

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!