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
Rashmi Philip
Front End Web Development Techdegree Student 2,688 Pointscorrect code is shown as incorrect
I have submitted the correct code in the editor for the following challenge:
Create a breakpoint for devices 480 pixels wide or larger. Inside the breakpoint, set the h1 font-size to 2.5em.
Yet the code checker keeps displaying it as incorrect and I am unable to figure out the mistake.
Here's the code i have used :
@media screen and (min-width: 480px) {
h1 {
font-size:2.5em;
}
}
4 Answers
Steven Parker
243,644 PointsNow that I've seen the challenge I know that your media query is good in itself. But now since I didn't see the whole code I'm going to take another guess that you did not put your code at the end of the file. It's important to put media queries last so they can take precedence over other rules of the same specificity when they apply.
I'll bet that you only need to move your code to the end of the file so it can work correctly.
Steven Parker
243,644 PointsWithout seeing the challenge, I might take a wild guess that they did not intend for you to specify "screen".
Rashmi Philip
Front End Web Development Techdegree Student 2,688 PointsHere's the link to the challenge :
Rashmi Philip
Front End Web Development Techdegree Student 2,688 Pointsthanks a lot steven! it worked!
Steven Parker
243,644 PointsHappy to help.
Steven Parker
243,644 PointsSteven Parker
243,644 PointsIt would help if you can provide a link to the challenge page.