I’m seeing the following CSS declaration in a stylesheet:
font: 12px/18px ...
What does the 12px/18px part mean exactly?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
12pxis the font size,18pxis the line height.The syntax is based on typographical notation for specifying the respective sizes, and is only applicable to the
fontshorthand property. In other words, the above declaration simply expands to the following:As always, if you set the line height to a relative value (e.g. percentage or ems), it’s calculated relative to the font size.
W3C CSS2.1
fontproperty referenceW3C CSS3 Fonts Module
fontproperty reference (the syntax carries over from CSS2.1)