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

Lloyd Keogh
Lloyd Keogh
7,252 Points

How does REM work

I am trying to complete the code challenge at the moment but cannot find the error in my syntax! Any help is appreciated?

h1 { font-size: 2.5em; }

p { font-size: 1.5em; }

html { font-size: 16px; }

a .more { font-size= 1rem; }

3 Answers

Try getting rid of the "a" in your last line of code, you only need to specify .more- because that is the class.

Lose the html { font-size: 16px; } as well! No need for it.

I think the exercise actually does want you to use the a, but it needs to be formatted as a.more no a .more

I did it without a .more and it passed, I however did not include the html font size line because it is unnecessary. I hope this helps! :)

Lloyd Keogh
Lloyd Keogh
7,252 Points

Thanks for your help guys but it's still not working! I tried all the suggestions you made but no luck! I use google chrome so I tried it in IE but still no luck! I'll just have to keep working away at it!

h1 { font-size: 2.5em; }

p { font-size: 1.5em; }

a.more { font-size: rem; }

Lloyd Keogh
Lloyd Keogh
7,252 Points

Thanks for your help guys but it's still not working! I tried all the suggestions you made but no luck! I use google chrome so I tried it in IE but still no luck! I'll just have to keep working away at it!

h1 { font-size: 2.5em; }

p { font-size: 1.5em; }

a.more { font-size: rem; }

You have an equal sign instead of a colon where you are declaring your a.more font size. Other than that your code is correct.

Lloyd Keogh
Lloyd Keogh
7,252 Points

Thanks for your time! Yeah I see that what an amateur mistake I'll need to double check my syntax more thoroughly, However, even with that change it's still somehow incorrect!

Lloyd Keogh
Lloyd Keogh
7,252 Points

Hi guys I thought I'd let you know that I have solved the problem!! It was to do with the 'rem' value it should actually be '1rem' and it works so again thanks for your help anyway!

Lol, well you had 1rem in your original post! Glad you got it though!