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 trialAndrey Leushin
2,331 PointsCreate 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
22,818 PointsAre you doing something like this? Because it should work:
@media screen and (min-width: 480px){
h1 {
font-size: 2.5em;
}
}
Voyti 1
1,854 PointsDoes 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
1,854 PointsAnd 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; } }
Kayla Flynn
7,652 PointsI'm having the same issue
Lukasz Sadorski
5,999 PointsMake 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
946 Pointshave 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
2,331 Pointsoh, thanks, I forgot about that