Declaring Fonts

Discussion in 'CSS' started by gobbly2100, Dec 29, 2008.

  1. #1
    Hey all,

    When you set fonts with CSS, why do you often see multiple fonts declared in one place like this:

    font-family: Tahoma, Geneva, sans-serif;
    Code (markup):
    How do fonts work exactly? Can you set a font and then have the browser use a different font if the first one does not exist or something?
     
    gobbly2100, Dec 29, 2008 IP
  2. tr1x

    tr1x Peon

    Messages:
    144
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Exactly correct.
     
    tr1x, Dec 29, 2008 IP
  3. gobbly2100

    gobbly2100 Banned

    Messages:
    906
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Awesome, thank you!
     
    gobbly2100, Dec 29, 2008 IP
  4. kmap

    kmap Well-Known Member

    Messages:
    2,215
    Likes Received:
    29
    Best Answers:
    2
    Trophy Points:
    135
    #4
    Its like this

    If first font is missing for a person who is visiting your page the browser then choose the second font in the list to show the page

    offcourse it tries for a generic font first if that is availble

    for example if you are using arial narrow and the person who is viewing donot have arial narrow it will try to load the page with a generic font like arial (which belong to same family)

    Regards

    alex
     
    kmap, Dec 30, 2008 IP