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 trialMatthew Root
5,392 PointsNot sure why this code challenge is saying my code is wrong for this media query.
/* Is anything wrong with this?*/
@media screen and (min-width: 480px) {
h1 {
font-size: 2.5em;
}
}
2 Answers
Ken Alger
Treehouse TeacherMatthew;
Welcome to Treehouse!
Your syntax is great, nice work! Did you put your media query at the bottom of the CSS in the code challenge? If you don't the h1
styling which occurs at line 27 will cascade over your media rule.
Happy coding,
Ken
huckleberry
14,636 PointsGood question!
I didn't even think of that. I bet you it's that simple lol.
Cheers,
Huck -
Matthew Root
5,392 PointsGot it! You are exactly right! Thanks!
huckleberry
14,636 PointsI just tried your exact code with a copy paste and it worked just fine. Try restarting the challenge and see if it doesn't work. Sometimes it just bugs out on you.
Cheers,
Huck -
huckleberry
14,636 Pointshuckleberry
14,636 PointsHey there,
I cleaned up your code there so it displays properly. In the future, wrap all your code with 3 backticks (the tilde key next to the number 1 key.) and place the name of the language after the first 3 backticks.
Like so...
Cheers,
Huck -