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

Challenge Task 3 question

The challenge is asking me to do the following:

Select the link with the class more. Using the rem unit, set its font size back to the base font size of the root HTML element.

I'm not sure how to accomplish this?

3 Answers

Hi Amanda,

The first question states the browser's default size is 16px. Actually it really doesn't matter how many pixels the default size is. The browser's default size is going to be 1em, or 1rem. Also, the root HTML element is < html > < /html >. While the wording of the question may appear a little vague, I'm sure the intent is to make you think about it.

Jeff

.more {
  font-size: 1rem;
}
Youssef S
Youssef S
4,467 Points

The following is from this good read by one of the good folks at CSS-Tricks: Jonathan Snook. Check the article

In respect to the previous correct answer, make sure you understand the difference between em and rem as well: The em unit is relative to the font-size of the parent. The rem unit is relative to the root—or the html—element. That means that we can define a single font size on the html element and define all rem units to be a percentage of that.

Thank you Jeff! I had the 1rem part correct by I was denoting the link the wrong way. Thank you so much for your help.

Amanda