Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    Regular Coder
    Join Date
    May 2002
    Location
    Helsinki, Finland
    Posts
    231
    Thanks
    0
    Thanked 1 Time in 1 Post

    Font size with two values

    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..
    Last edited by Zvona; 02-07-2007 at 02:10 PM.
    Zvona
    First Aid for
    Web Design

  • #2
    Regular Coder
    Join Date
    Jan 2007
    Posts
    213
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Strange I have never seen it either, infact when I tested the script it didnt actually do anything :S
    Matthew Bagley
    Paramiliar Design Studios
    Website Design | Website Development | Search Engine Optimisation (SEO)

  • #3
    Senior Coder ahallicks's Avatar
    Join Date
    May 2006
    Location
    Lancaster, UK
    Posts
    1,134
    Thanks
    1
    Thanked 57 Times in 55 Posts
    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?
    "write it for FireFox then hack it for IE."
    Quote Originally Posted by Mhtml View Post
    Domains are like women - all the good ones are taken unless you want one from some foreign country.
    Reputation is your friend

    Development & SEO Tools

  • #4
    Regular Coder
    Join Date
    May 2002
    Location
    Helsinki, Finland
    Posts
    231
    Thanks
    0
    Thanked 1 Time in 1 Post
    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.
    Zvona
    First Aid for
    Web Design

  • #5
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    It's CSS shorthand. i.e.,

    Code:
    font-weight: bold;
    font-size: 76%;
    line-height: 1.5;
    font-family: verdana, arial, sans-serif;
    can be written as

    Code:
    font: bold 76%/1.5 verdana, arial, sans-serif;
    See this link for more info:

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

  • #6
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,252
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Specs

    It's a regular part of the W3C specs: W3C CSS 2.1 - font property.
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #7
    Regular Coder
    Join Date
    May 2002
    Location
    Helsinki, Finland
    Posts
    231
    Thanks
    0
    Thanked 1 Time in 1 Post
    Well, today I've learned something new..

    ..it's a good goal for every day life \o/
    Zvona
    First Aid for
    Web Design


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •