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

Marie Veverka
Marie Veverka
12,117 Points

rem units

I don't understand what I am doing wrong.

Dave McFarland
Dave McFarland
Treehouse Teacher

Can you tell us which task you're having trouble with (there are 3 tasks in this code challenge: https://teamtreehouse.com/library/css-foundations/values-and-units/relative-length-units

Also, what answer are you giving?

James Barnett
James Barnett
39,199 Points

It's hard for us to know what's causing the issue you are having if you don't show us your code. For some tips on how to do that, check out the tips for asking questions video located in the right hand sidebar.

2 Answers

Steven Deutsch
Steven Deutsch
21,046 Points

Hey Marie,

That code challenge has 3 parts all dealing with relative length units. If you're having trouble, I suggest going back and re-watching some of the tutorial videos that deal with this topic. In case you're still stuck after that, let me give you a few hints that I think will help you solve the challenge.

Relative Units: 1em = 16px by default (the browsers default of 16px is given in code challenge instructions).

So, for example, if you needed to define a value of 64px using em units it would be 4em.

1rem = the font size of the root element of the page.

So, for example, if you know the font size of the root element of the page is 16px, a value of 2rem would represent a value of 32px.

Hope this information helps you pass the challenge! Good luck.

Marie Veverka
Marie Veverka
12,117 Points

My apologies gentlemen, I reposted this question with the code a few minutes after this post and Dave was kind enough to show me what I was doing wrong. Thanks for checking in though.