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 Layout Techniques Display Modes Which CSS Reset Method Should I Use?

1.1em/1.5

font: normal 1.1em/1.5 sans-serif;

For this CSS rule, I've never seen a slash like that in CSS. What's it do?

2 Answers

Josh Miclette
PLUS
Josh Miclette
Courses Plus Student 6,227 Points

Hey Tony - thanks for posting your question.

What you're seeing is CSS shorthand notation. Although it outputs less code, I’ve learned that it’s important to understand every selector, property, and value first (aka CSS syntax).

To your question.

What you’re seeing is this:

.example {
font: normal 1.1em/1.5 sans-serif;
}

Which before shorthand notation looks like this:

.example {
font-weight: normal;
font-size: 1.1em;
line-height: 1.5;
font-family: sans-serif;
}

I hope this helps.

Josh