CSS gurus - Why double list font size?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DWB
    Registered User
    • Jul 2003
    • 31779

    #1

    CSS gurus - Why double list font size?

    I'm working with a Wordpress theme and the CSS is listing font size as two sizes, like this...

    Code:
    .nav-entries a, .post-entries a { [B][COLOR="Cyan"]font: 14px/16px[/COLOR][/B] Arial, Helvetica, sans-serif; color:#6ca0a8; font-weight: bold; text-decoration:none;}
    Never come across this before. Can someone explain to me the reason?

    Thanks
  • harvey
    Confirmed User
    • Jul 2001
    • 9266

    #2
    it's a bad behavior, but it's used to determine the line-height
    This post is endorsed by CIA, KGB, MI6, the Mafia, Illuminati, Kim Jong Il, Worldwide Ninjas Association, Klingon Empire and lolcats. Don't mess around with it, just accept it and embrace the truth

    Comment

    • glowlite
      Confirmed User
      • Dec 2005
      • 366

      #3
      As harvey said it has to do with the line-height property when using font: shorthand.
      Very bad behavior, unpredictable results.

      font: 14px/16px is the same as,
      font-size: 14px; line-height: 16px;

      CSS shorthand is not always reliable cross-browser.
      For best cross-browser results body{ baselines are best practice along with baselines for other commonly used elements.
      ie: P{ margin:;padding:;}

      Comment

      • DWB
        Registered User
        • Jul 2003
        • 31779

        #4
        Thanks guys, I will re-write this.

        Comment

        Working...