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

Stuck on REM

I can't get this code challenge to work. em font size is 1.5 so converting to rem should be 1.5rem?? I don't understand this. It's scaling to .5 times larger than the root font but, not sure what the right answer is. Help please. Thx.

3 Answers

Hi Pamela, check out the formula below.

Target Size / Base Size = Value

So you have: 16px = 1rem (base)

When all else fails use a calculator.

.more {
  font-size: 1rem;
}

Hi Dustin, Thanks for your reply. I got it to work. I was using 24 as the base instead of 16 because, I had changed the p font size in task number 2 and I thought that was the base. Might have been over thinking it. So is 16 the base in all cases? Thanks for your help.

The base font size is set in the browser. Most times it is 16px but it's good practice to use CSS resets.

Okay, thanks.