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 Adding Breakpoints for Devices

Andrey Leushin
Andrey Leushin
2,331 Points

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

I can't figure out how to do it? I write like this: font-size: 1.75em; I replaced the-font-size: 2.5em; @media screen and (min-width: 480px){ }

5 Answers

Ben Schroeder
Ben Schroeder
22,818 Points

Are you doing something like this? Because it should work:

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

Does it matter where you type this code in main.css? When I typed it in the beginning it was saying that it's wrong, when I typed it in the bottom of the main.css, exactly the same code - it was OK

Voyti 1
Voyti 1
1,854 Points

And now in the second task, where you have to change h2 font size to 1.75em, it says that it's incorrect: @media screen and (min-width: 480px) { h1 { font-size: 2.5em; { }

@media screen and (min-width: 660px) { h2 { font-size: 1.75em; } }

I'm having the same issue

Lukasz Sadorski
Lukasz Sadorski
5,999 Points

Make sure you write your code at the bottom of all your CSS code. It should look like this:

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

@media screen and (min-width: 660px) { h2 { font-size: 1.75em; } } ```

Dimi Tri
Dimi Tri
946 Points

have the same problem. thats because in codechallenge css/main.css file opens. But it should be responsive.css :(

Dear Teamtreehouse , could u please fix it?

Andrey Leushin
Andrey Leushin
2,331 Points

oh, thanks, I forgot about that