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

HELP: 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

24 * 1.5 = 36

so line-height: 36px; should be what it is asking for.

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

Got it! I needed to use line-height instead of font-size and set the value to 150%.

Megan 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

Got it! I needed to use line-height instead of font-size and set the value to 150%.

Sweet! :)