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

Quizz at relative units

I am at the quizz for relative units and I am giving the .h1 the font-size of 2.500em as an equivalent of 40 pixels and it doesn't work. Can anyone help me with the corect answer?

3 Answers

It has to be a syntax error because your number looks right. I noticed you put (.h1) in your question; you don't need a dot in front of h1. Also make sure you open and close your curly brackets after h1. Inside them, put font-size: (did you use a colon or equal sign? Colon is correct, followed by a space), then your numerical value followed by em (no space between). And don't forget the semicolon (;) after em.

I am having the worst time remembering when to use the dot, equals, colons, space, no space, etc., so syntax is usually my #1 problem.

In terms of remembering CSS syntax this helps me

2.5em is correct for a target of 40px

try just entering the answer to 1 decimal place (2.5em)

Edit= Actually i may have got what your asking wrong,

Do you want to change it from em to pixels?

I solved it. I just didn't come back to post. Indeed the dot was the problem. I realized when I looked at my notes after a while.