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

Hamza Aftah
Hamza Aftah
3,055 Points

I need Help!!!

I do not see what I am doing wrong in this question?

I changed the font-size to 2,5em for the h1 and set the min-width to 480px

Jason Anders
Jason Anders
Treehouse Moderator 145,860 Points

Without seeing your code, it's hard to troubleshoot for you.

Please see this post for tips on posting code in the forum

Hamza Aftah
Hamza Aftah
3,055 Points

Create a breakpoint for devices 480 pixels wide or larger. Inside the breakpoint, set the h1 font-size to 2.5em.

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

MOD NOTE: added markdown to code.

Hamza, your code looks fine. Also double checked by copying and pasting your code directly into the challenge and it passed.

Hamza Aftah
Hamza Aftah
3,055 Points

I keep getting error code saying " did I add the 2.5em to h1"

The problem is probably else where...

Look at the code above your media query and make sure you didn't delete a ending curly brace on the above CSS rule block.

Hamza Aftah
Hamza Aftah
3,055 Points

I got it to work.

I was writing on top of other codes and it didn't belong there I guess .

Thank you so much for your help!

2 Answers

Camilla Holst
Camilla Holst
8,876 Points

It needs to be a dot in the 2.5em value :)

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,860 Points

Robby is correct. The code is fine and it does pass the challenge.

First, are you placing the code block at the end of the pre-loaded code? If you're not, you will get an error, as any new code asked for by the challenge needs to be placed after all preloaded code (unless otherwise specified by the question/challenge).

If that doesn't work, copy your own code supplied here (I added markdown to create a block), close the window with the challenge and reopen (or simply refresh the page) and paste the code back in at the bottom.

Let us know if this gets resolved.

Hamza Aftah
Hamza Aftah
3,055 Points

I got it to work. Thank you so much for your help!