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
Tony McCabe
8,445 PointsConverting Nested PX to EMs
Using an H1 with a font size of 24px as your context, convert the size of the link inside the H1 from 18px to ems.
I came up with 1.125em, but it say's bummer!
3 Answers
Steven Schweibold
7,742 PointsThe first thing to understand is the formula:
element size / context = EMs
The question states:
Using an H1 with a font size of 24px as your context, convert the size of the link inside the H1 from 18px to ems.
So in your case, 24px is the context & 18px is the font size of the element you want to convert.
Chase Lee
29,275 PointsSize divided by context = EMs
John Locke
15,479 PointsThe H1 size is what you start with, the base size. As a percentage of that size, what would the target size be?
James Barnett
39,199 PointsJames Barnett
39,199 PointsSteven Schweibold - I edited your post so as not to give away the answer.
Here on the forum we like to give hint but still let the user solve their own problems. As the goal of the forum is to help them learn not get them past a particular code challenge.
Thanks and happy forum'ing.