View Full Version : Explanation for css font:
06-05-2010, 05:41 AM
Today, I saw some code that was a bit different than I am used to seeing. Hope someone can explain the /1?
The code was:
font: 80%/1 arial, helvetica, sans-serif;
I understand the font types, but what has me stumped is why the /1? Why not just set it to 80%?
Just thought someone might have an idea.:confused:
06-05-2010, 06:28 AM
The /1 designates the line-height (leading). Leading is typically something around 1.5 by default.
For example, font: 0.75em/1.6 serif; would give me a line-height of 1.6.
06-05-2010, 05:16 PM
And does that shorthand work across all browsers? First time I've seen that too.
06-05-2010, 06:20 PM
Hi there cc4digital,
the full font shorthand is...
font: [font-style] [font-variant] [font-weight] [font-size/line-height ] [font-family ]
06-05-2010, 06:42 PM
Font shorthand works in any browser that vaguely matters.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.