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 trial

CSS How to Make a Website Customizing Colors and Fonts Add Fonts

trying 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

Hi Grant,

Your only issue is that you left off the em units.

You have 1.75 and it should be 1.75em

h1 { font-family: 'Open Sans', sans-serif; font-size: 1.75; font-weight: normal; }

Grantβ€”

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.

  1. Place three backticks on the line above your code.
  2. Write your code as you would in a code editor.
  3. 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