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 trialAnthony Rudny
Full Stack JavaScript Techdegree Graduate 29,494 PointsMy code works in my workspaces environment, but not for this quiz question?
Not sure what I'm missing? Code below works great in workspaces when testing.
@media screen and (min-width: 480px) { h1 { font-size: 2.5em; } }
2 Answers
Steven Parker
231,210 PointsI'll bet that you put your media query near the top of the CSS file.
Media queries should always be added to the end of existing CSS, so when their conditions are met they can override any other rules with the same specificity level.
If you look through the provided CSS, you'll find that it already has a rule that sets the font-size
for h1
elements. If the new rule is placed above it, the old one will override it.
Happy coding! -sp
Anthony Rudny
Full Stack JavaScript Techdegree Graduate 29,494 PointsYes! That was it. Thanks guys!
John Coolidge
12,614 PointsJohn Coolidge
12,614 PointsCan you show us your code inside the challenge you mention? Your code does indeed seem to be written correctly, but you could be placing your breakpoint in the wrong area of your CSS.
Thanks!