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
Megan C Moses
2,916 PointsHELP: Can't Figure Out How To Determine a Line-Height 1.5 the Paragraphs Font-Size
I'm stuck on this question and have tried several vales but still can't figure it out. I know this is simple, so it's driving my crazy that I can't figure it out. Here's the code challenge: Use a unitless line height that is 1.5 times the paragraph's font size.
Here's what I have:
h1 { text-transform:capitalize; }
p { text-indent:50px; font-size:24; }
3 Answers
Kevin Korte
28,149 Points24 * 1.5 = 36
so line-height: 36px; should be what it is asking for.
Megan C Moses
2,916 PointsGot it! I needed to use line-height instead of font-size and set the value to 150%.
Kevin Korte
28,149 PointsSweet! :)
Megan C Moses
2,916 PointsMegan C Moses
2,916 PointsJust tried it and it doesn't work. Got any other suggestions?
I had 24 inputted for the size because i calculated 1.5 * 16 = 24. Since the default browser font is 16px and I haven't been asked to set the size to something before this question.
Megan C Moses
2,916 PointsMegan C Moses
2,916 PointsGot it! I needed to use line-height instead of font-size and set the value to 150%.
James Barnett
39,199 PointsJames Barnett
39,199 PointsMegan C Thompson & Kevin Korte -
A percentage is actually not what a unitless line-height means, it means to use a multiplier.
p { line-height:1.5; }Here's an article where you can read more about unit-less line-height