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

Converting 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

The 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.

Steven 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.

Size divided by context = EMs

The H1 size is what you start with, the base size. As a percentage of that size, what would the target size be?