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

What measure unit has been used to determine body line-height?

In the "basestyle.css" we have something like this: body{ line-height: 1.6; } First I thought it was "em" unit, but changed to "em" the layout changes too which means its not. What type of units have been used in this case, pixels, percentage? Basically the question is: what units do we use if we don't define any, like in this example?

1 Answer

When no unit is applied to the line-height value the value becomes the value entered multiplied by the font-size, here are some good posts about line-height:

MDN

CSS Tricks