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 trialRichard Srery
640 PointsHow 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?
2 Answers
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
Courses Plus Student 11,685 PointsSelecting 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
Armando Barajas
7,766 PointsArmando Barajas
7,766 PointsDivide 20 by 16 and that will give you your em value.