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

Okay, the base font is set to 16px. My first two tasks give this result:

h1 { font-size: 2.5em; }

p { font-size: 1.5em; }

after that I am supposed to return the link with the class more to the base font size using rem. I tired this and it didn't work:

a class="more" { font-size: 1rem; }

I have tried all sorts of things and nothing seems to work. I even tried adding in the html font-size 1em, 1rem and 16px and nothing seems to work. Please help. Thanks! ;-)

2 Answers

Dave McFarland
STAFF
Dave McFarland
Treehouse Teacher

There are two ways you can write a class selector for this:

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

or

.more {font-size: 1rem;}

You only use class="more" when you add a class to an HTML element -- not in your CSS.

Marie Veverka
Marie Veverka
12,117 Points

Ohh, thanks Dave! I really appreciate it!