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.
The font-size CSS property sets the size of the font. Changing the font size also updates the sizes of the font size-relative <length> units, such as em , ex , and so forth.
The 12px is the height of the font in pixels. The 13px is the height of the line in pixels.
To change the size of your text with inline CSS, you have to do it with the style attribute. You type in the font-size property, and then assign it a value.
The font property is a shorthand property for: font-style. font-variant. font-weight. font-size/line-height.
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: ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With