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 CSS Foundations Values and Units Relative Length Units

Having trouble re-sizing my header from Px to Em

Currently working on the code challenge for Relative Length Units, and the first question asks you to change the header 1 size to be equivalent to 40px. I already know that 40px/16=2.500em so you would think by putting the code: h1 } font-size= 2.5em } would work right? Can someone please assist me.

3 Answers

Stone Preston
Stone Preston
42,016 Points

your css code uses incorrect syntax. you have:

h1 } font-size= 2.5em }

you need

h1 { font-size: 2.5em; }

Hi Tanner, You are correct about the conversion to em, but you have a couple of syntax errors. You need to follow the property name (font-size) with a colon not an equal sign, and your first curly brace (right after the h1) is backwards. It should be like this:

h1 { font-size: 2.5em; }

Thank you so much. That's been my problem for awhile is my "=" on most of my coding.

Thanks again!