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 trialGrant Sebastian
Courses Plus Student 981 Pointstrying to set h1 font size to 1.75em and font-weight to normal feel like im doing it right but it says im wrong
'''h1 { font-family: 'Open Sans', sans-serif; font-size: 1.75; font-weight: normal; }'''
3 Answers
Jason Anello
Courses Plus Student 94,610 PointsHi Grant,
Your only issue is that you left off the em
units.
You have 1.75
and it should be 1.75em
Grant Sebastian
Courses Plus Student 981 Pointsh1 {
font-family: 'Open Sans', sans-serif;
font-size: 1.75;
font-weight: normal;
}
Zachary Johnson
24,858 PointsGrant—
It looks like you just forgot to specify the unit of measurement. As Jason explained, setting the font-size to 1.75em
should work.
As a side note, here is a guideline for improving code readability in future posts:
Note: Put a blank line before all of this if you have text directly above it, otherwise your code won't render properly.
- Place three backticks on the line above your code.
- Write your code as you would in a code editor.
- Place three backticks on the line below your code.
Following these steps will allow you to format your code as a code block.
Here's an outline of what this would look like:
Example text.
This line would be left blank because there is text directly above it.
Place three backticks here.
Write code here (usually multiple lines for improved organization).
Place three backticks here.
For example. your original code (from the question in your first post) would end up looking like this:
h1 { font-family: 'Open Sans', sans-serif; font-size: 1.75; font-weight: normal; }
The corrected code (from the answers in the comments), separated into multiple lines to improve organization, looks like this:
h1 {
font-family: 'Open Sans', sans-serif;
font-size: 1.75em;
font-weight: normal;
}
This might not seem necessary for short bits of code, but it should help later on if you need help when you progress to lessons and projects that have more complex code.
—Zach