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 trialGabriel Kruse
969 PointsCreating a breakpoint for devices with 480px width. Code is not working
am I missing an element in my code to get this to work? It is still asking me to change the font-size to 2.5em's
@media screen and (max-width: 480px) { h1 { font-size: 2.5em; } }
2 Answers
Adam Bodie
34,341 PointsThe question asks you to set the breakpoint to make the font size 2.5em for devices 480px and larger. Your code has it set to 480px and smaller. Just change max-width to min-width to get the correct answer. Otherwise your code is correct.
Gabriel Kruse
969 PointsThanks so much!
Chyno Deluxe
16,936 PointsThe challenge is asking you to
Create a breakpoint for devices 480 pixels wide or larger
You are making a breakpoint for devices smaller than that. change max-width to min-width and it should work
@media screen and (min-width: 480px) {
h1 {
font-size: 2.5em;
}
}
Gabriel Kruse
969 PointsThanks a ton for this! was driving me crazy!
gnarfugh
11,540 Pointsgnarfugh
11,540 Pointshey, you're so close. You need to use (min-width:480px) because it's for devices 480px and larger. So the minimum width needs to be 480px.