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 trialAntuan Vazquez
991 PointsNeed help on the challenge asking to set the h2's 53px size to a relative em size.
So on the challenge it says to set the h2 font size of 53px to a relative em size. The h2 parent element is 16px. So I set it to 5.313 but the challenge says its wrong. What is incorrect about that??
This is how I wrote the code
/* Complete the challenge by writing CSS below */
header { font-size: 1.8em; }
.title { font-size: 1.625rem; }
h1 { font-size: 5.625rem; }
h2 { font-size: 5.313em; }
7 Answers
Jason Anello
Courses Plus Student 94,610 PointsHi Antuan,
You should be dividing the 53px by the 16px parent font-size.
I get 3.3125
Michael Culler
7,363 Pointsyeah i got 3.313 too and i even used the em converter he posted in the teachers notes to make double sure
Jason Anello
Courses Plus Student 94,610 PointsHi Michael,
In general, for these types of problems you should do the division on a calculator to get the most accurate results. You want to keep as many decimal places as possible. In this case, a calculator gives the exact answer of 3.3125 instead of the rounded off answer of 3.313 that any kind of program or website might give you.
Jaime McQueen
2,885 PointsI have been having a similar issue as well, I am quite familiar with CSS coding and even double verified through several conversions and my Dreamweaver program, to arrive at 3.313em. There needs to be some clarification in terms of what rounding is expected as well as to specifically define exactly what is required within the question.
Antuan Vazquez
991 PointsYeah I did. Must be a glitch.
Jason Anello
Courses Plus Student 94,610 PointsSorry it's not working out for you.
Maybe try doing a hard refresh on the code challenge page. Or clearing the browser cache.
If the problem persists then I would contact treehouse support.
Andres Barbudo-Rodriguez
2,663 Pointshi, I had the same problem but Jason Anello's answer solved my problem I was dividing wrong but when I tried the solution had no boomer at the end.
thank you
Michael Culler
7,363 PointsJason, i'm not going to apologize for using the resources provided in the teachers notes. If it is so wrong to use them then they should not be provided. i wasn't asking for help, i was stating that it happened to me too.
Jason Anello
Courses Plus Student 94,610 PointsI apologize if it came across that way. That was not my intention. Nobody should be expecting you to apologize for that.
I was only trying to clear up any confusion that others may have who come across this same problem.
I will alert the staff to the problem.
Michael Culler
7,363 Pointsthank you
Antuan Vazquez
991 PointsAntuan Vazquez
991 PointsI used that value but it still marks it as a wrong answer. I guess its the challenge thats wrong not me. Thanks for the help anyways.
Jason Anello
Courses Plus Student 94,610 PointsJason Anello
Courses Plus Student 94,610 PointsDid you specify it like this for task 2?
That passes task 2 for me. Maybe give it another try.