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 trialGerald Susanteo
Front End Web Development Techdegree Student 7,117 PointsCreate a new rule that targets the h2. The parent element of the h2 has a font-size value of 16px. Use an em unit to giv
my first answer was 3.313em and it says i was wrong so search for the answer from the community 3.13125, and still wrong
2 Answers
Hassan Al Manawy
24,859 PointsPerfect. Thatβs why 3.3125em is correct.
I have looked at the challenge as well, and itβs the other way around (em*16 = ... px)
header { font-size: 1.8em; (28.8px) }
.title { font-size: 1.625em; (26px) }
h1 { font-size: 5.6(89.6px)
Hassan Al Manawy
24,859 PointsHi Gerald,
What is the target font size in your question? In a general sense, you can convert px to ems by dividing the target font size by the parent element font size. e.g. target font-size: 80 px - parent element: 16px = 80/16 = 5em
Assuming the target font size is 50px, divide it by 16 = 3.125em.
for 53px/16 = 3.3125em
Hope that helps.
Regards, H
Gerald Susanteo
Front End Web Development Techdegree Student 7,117 Pointstarget font size is 53px
Gerald Susanteo
Front End Web Development Techdegree Student 7,117 PointsGerald Susanteo
Front End Web Development Techdegree Student 7,117 Pointsthank you so much!!! i think when i used the calculator it simplified it by itself to 3.313em