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 Basics (2014) Understanding Values and Units Styling the Intro Paragraph

How do i...

How do in select the intro class and add a font-size property. Using 16px as the parent font-size context then give intro an em font-size value equivalent to 20px?

Divide 20 by 16 and that will give you your em value.

.intro {
  font-size: 1.25em;
}

2 Answers

Andrew Bonifacio
Andrew Bonifacio
13,012 Points

.intro { font-size: 1.25em;}

To convert to ems just divide the 20px by 16. E.g. 20px / 16 = 1.25

ahmed suleiman
PLUS
ahmed suleiman
Courses Plus Student 11,685 Points

Selecting a class you start with Dot (.) then followed by the class name then followed by {}, let's say my class name is begin in HTML thus in CSS I select it like this .begin{}, using the unit ems it is crucial you should know your default size thus since you said 16px which is 1em so if you are given 40px it should be what? Good luck I think you got this