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 trialTanya Torres
9,791 PointsWhat am I doing wrong?
I was asked to create a breakpoint for devices 480 pixels wide or larger. Inside of the breakpoint the h1 font-size needs to be set to 2.5 em. What am I doing wrong here??
Tanya Torres
9,791 PointsI apologize. I thought it attached the code automatically. Is there a way to attach it at this point?
But based on the question I'm thinking the syntax should be:
@media screen and(min-width: 480px) { h1{ font-size: 2.5em; } }
Correct? How am I possibly messing this up?
2 Answers
Julian Gutierrez
19,201 PointsThere needs to be a space between "and" and the opening parenthesis.
@media screen and (min-width: 480px) {
h1{
font-size: 2.5em;
}
}
Tanya Torres
9,791 PointsWow. Thank you so much.
Julian Gutierrez
19,201 PointsNo problem, believe it or not missing spaces, semi-colons, brackets, and general mistyping happen more often than not even for experienced coders.
Tanya Torres
9,791 PointsOh I believe that. I study Computer Science at my university. I decided to use this website to keep my skills sharp and learn new ones!
Julian Gutierrez
19,201 PointsJulian Gutierrez
19,201 PointsCan you please post your code?