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 CSS Foundations Advanced Selectors Substring Matching Attribute Selectors

CSS font-size

It seems Guil is using the following syntax a lot:

font: 1.1em/1.5 sans-serif;

What does it mean?

4 Answers

Shorthand for the font property. First number, 1.1em, is font-size, and the second number, 1.5, is the line-height.

https://developer.mozilla.org/en/docs/Web/CSS/font

1.1em is the font-size, the number after the slash (1.5) is the line-height, and sans-serif is the font-face.

Shivam Sadachar
Shivam Sadachar
8,109 Points

The first part, 1.1em is targeting the font-size, the 1.5 is targeting the line-height of the font, and the sans-serif is the font-family.

Yup, Guil just started putting the font-size and line-height together with a forward slash. I didn't get it at first either :) Hope that helps.

Cheers guys! Awesome. I was thinking it was a way to divide the font size!