Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
Thread: Explanation for css font:
06-05-2010, 05:41 AM #1
- Join Date
- Oct 2009
- Thanked 0 Times in 0 Posts
Explanation for css font:
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.
06-05-2010, 06:28 AM #2
The /1 designates the line-height (leading). Leading is typically something around 1.5 by default.
font: 0.75em/1.6 serif;would give me a line-height of 1.6.
06-05-2010, 05:16 PM #3
And does that shorthand work across all browsers? First time I've seen that too.
06-05-2010, 06:20 PM #4
- Join Date
- Jan 2004
- chertsey, a small town 25 miles south west of london, england.
- Thanked 331 Times in 324 Posts
Hi there cc4digital,
the full font shorthand is...
font: [font-style] [font-variant] [font-weight] [font-size/line-height ] [font-family ]
Last edited by coothead; 06-05-2010 at 06:23 PM.
06-05-2010, 06:42 PM #5