SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Former Staff Member silver trophy Adam P.'s Avatar
    Join Date
    Apr 2001
    Location
    San Francisco
    Posts
    3,288
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Font-Size: What's up with the "/"?

    For example:

    font-size : 12px/14px

    What is this saying/doing?
    SPF Mentor/Advisor 2001-2003
    SPF Designer of the Year 2002
    SPF Graphic Designer of the Year 2003
    AdamPolselli.com

  2. #2
    SitePoint Wizard Bill Posters's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    12px/14px is the CSS shorthand method of saying 12px font-size with a 14px line-height.

    However, you can't actually use with font-size as you have in the example.

    It will only work (or rather is only supposed to work) if you are using the font shorthand attribute.
    Code:
    font: 12px/14px ;
    The 'method' was borrowed from print, which has been using that shorthand for eons.
    That example would be "twelve pixels over fourteen".

    For further examples of how the font shorthand method can be used see W3Schools CSS font property page.
    Last edited by Bill Posters; Jul 20, 2002 at 03:05.
    New Plastic Arts: Visual Communication | DesignateOnline

    Mate went to NY and all he got me was this lousy signature

  3. #3
    Former Staff Member silver trophy Adam P.'s Avatar
    Join Date
    Apr 2001
    Location
    San Francisco
    Posts
    3,288
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the informative reply!
    SPF Mentor/Advisor 2001-2003
    SPF Designer of the Year 2002
    SPF Graphic Designer of the Year 2003
    AdamPolselli.com


Bookmarks

Posting Permissions

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