...

View Full Version : Font size with two values



Zvona
02-07-2007, 02:06 PM
Hello everybody,

today I encountered to rather peculiar CSS declaration:
body {font:76%/120% Arial, Helvetica, sans-serif;}

First property (76%) stands for font-size and second one (120%) seems to affect on font/line height.

Is it really that I've been doing these things last decade for serious money and never have encountered declaration like above?

Is that declared somewhere as a CSS standard? I didn't found anything with quick browsing?

I'm still completely confused and amazed..

neomaximus2k
02-07-2007, 02:31 PM
Strange I have never seen it either, infact when I tested the script it didnt actually do anything :S

ahallicks
02-07-2007, 02:41 PM
I thought you used that declaration to define the font-size of the first font in your list, and the second size for the second font in your list? Maybe I'm making that up?

Zvona
02-07-2007, 03:17 PM
That feature of defining multiple declarations for multiple fonts is somewhere in "barrel of empty wishes", I think.

It worked for me both in IE and FF. And there are no scripts / alternate hacks modifying functionality.

rmedek
02-07-2007, 04:36 PM
It's CSS shorthand. i.e.,


font-weight: bold;
font-size: 76%;
line-height: 1.5;
font-family: verdana, arial, sans-serif;

can be written as


font: bold 76%/1.5 verdana, arial, sans-serif;

See this link for more info:

http://www.w3schools.com/css/pr_font_font.asp

ronaldb66
02-07-2007, 04:54 PM
It's a regular part of the W3C specs: W3C CSS 2.1 - font property (http://www.w3.org/TR/CSS21/fonts.html#propdef-font).

Zvona
02-08-2007, 12:44 AM
Well, today I've learned something new..

..it's a good goal for every day life \o/



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum