Castles
Castles

Reputation: 957

What does 14px/26px font size in css do?

I've been inspecting someone elses CSS and I noticed they are doing something I haven't seen before...

body {font:14px/26px "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif}

What does the 14px/26px do? I've tried to google it but nothing seems to come up.

Upvotes: 20

Views: 14943

Answers (1)

Pindatjuh
Pindatjuh

Reputation: 10526

According to the CSS 2.1 Specifications for the font shorthand property:

15.8 Shorthand font property: the 'font' property

'font'
Value: [ [ <'font-style'> || <'font-variant'> || <'font-weight'> ]? <'font-size'> [ / <'line-height'> ]? <'font-family'> ] | caption | icon | menu | message-box | small-caption | status-bar | inherit

The first value is the font-size value, and the second value is the line-height value.

So font: 14px/26px ... means:

font-size: 14px;
line-height: 26px;
font-family: ...

Upvotes: 38

Related Questions