Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Specifying two sizes in CSS font property? [duplicate]

Tags:

css

fonts

Possible Duplicate:
What does this CSS shorthand font syntax mean?

Sometimes the font is specified using two values, for example

font: 14px/60px 

Why are two values specified? When the 60px will be used? Thanks.

like image 852
user1117313 Avatar asked Jan 04 '12 12:01

user1117313


People also ask

Which property of CSS is used to set the size of a font?

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.

Which CSS property is used to specify the highest and size of the font?

The font-size property in CSS is used to specify the height and size of the font. It affects the size of the text of an element.

How do you double font-size in HTML?

To change the font size in HTML, use the style attribute. The style attribute specifies an inline style for an element. The attribute is used with the HTML <p> tag, with the CSS property font-size. HTML5 do not support the <font> tag, so the CSS style is used to add font size.

What are the two font properties?

The font-weight property is used to specify the weight of the font. The bolder and lighter values are relative to the inherited font weight, while the other values are absolute font weights.


2 Answers

The 60px is the line-height. It's a shorthand for:

font-size: 14px; line-height: 60px; 
like image 200
punkrockbuddyholly Avatar answered Oct 17 '22 19:10

punkrockbuddyholly


60px will be the line-height value

see http://www.developerfusion.com/code/5342/css-font-shorthand-rule/

like image 35
Fabrizio Calderan Avatar answered Oct 17 '22 17:10

Fabrizio Calderan