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 trialDevin Auspland
699 PointsSkill challenge not working.
Its asking me to create a breackpoint of screens larger then 480px and change h1's font size to 2.5 em...
Here is my code:
@media screen and (min-width: 480px) {
h1 {
font-size: 2.5em;
}
}
Its telling me I'm wrong.
5 Answers
Konrad Pilch
2,435 PointsYou should put your code at the bottom of the code, not at the top. It will work then. It's a knowledge challenge xd
Anthony Mejia
8,840 PointsTry removing the screen off of your media query.
@media (min-width: 480px) { h1 { font-size: 2.5em; } }
Let us know if this works!
Devin Auspland
699 PointsThis did not work, still saying bummer.
Anthony Mejia
8,840 PointsThis is strange. I can't find any problems with your code whatsoever.
Devin Auspland
699 PointsThe full response is :
Bummer! Did you change the h1 font-size to 2.5em for devices larger than 480px?
Anthony Mejia
8,840 PointsMy only concern would be the placement of your code. If there's any default code that might override yours, make sure to add your code below it. Hopefully this helps!
Konrad Pilch
2,435 PointsI wrote that. You just repeated me.
Michael Afanasiev
Courses Plus Student 15,596 PointsHey Devin,
Your code is correct, try adding it at the bottom of your css in the following format:
@media screen and (min-width: 480px) {
h1 {
font-size: 2.5em;
}
}
Konrad Pilch
2,435 PointsThe format doesn't matter.
In fact, the way he did it, is the recomended way because it contains only one thingy.. propertery the h1. If he had h1 and h2 or whatever more than two, it would be okay.
Konrad Pilch
2,435 PointsNot to mention it was like yours but he didnt put the
```html
so it displayed in line lol
Michael Afanasiev
Courses Plus Student 15,596 PointsHey Konrad,
I know it does not matter, but some minor things in Treehouse challenges can either stop you or let you pass it.
Konrad Pilch
2,435 PointsBut its either right, so it shoudn't matter. Because it's not wrong, im sure in this challenge Nick would had this kind of variation.
Michael Afanasiev
Courses Plus Student 15,596 PointsNever said you were wrong :)
Devin Auspland
699 PointsDevin Auspland
699 PointsI feel silly... should have known that haha. In the main code I put it in a separate CSS file so that wouldn't have mattered. Ohh you tricky treehouse ^_^
Konrad Pilch
2,435 PointsKonrad Pilch
2,435 PointsMedia queries go always at the bottom of the style-sheets. ^^
Konrad Pilch
2,435 PointsKonrad Pilch
2,435 PointsOtherwise they will over-write them.
If you have e.g.
h1 red
and h1 blue
the h1 will be blue because its later in the style-sheets.