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 trialTony Brackins
28,766 Points1.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
Courses Plus Student 6,227 PointsHey 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
Kristopher Van Sant
Courses Plus Student 18,830 PointsIt's a shorthand notation for font size, line-height, and font-family.
http://stackoverflow.com/questions/4080265/what-does-this-css-font-shorthand-syntax-mean?lq=1 http://www.iamchristinabot.com/blog/20110512/what-does-adding-a-slash-do-in-the-font-property-for-css/ http://stackoverflow.com/questions/4080265/what-does-this-css-font-shorthand-syntax-mean?lq=1