#1
  1. No Profile Picture
    Standards User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Posts
    146
    Rep Power
    12

    CSS Generic Font


    I'm getting a warning when validating a stylesheet, and I can't figure out why.
    The sheet validates, but it gives one warning that says:
    Line : 0 font-family: You are encouraged to offer a generic family as a last alternative
    What confuses me is that I already have.
    Code:
    font-family : Tahoma, Arial, sans-serif;
    On the w3 site they list sans-serif as a generic font. I've never had a problem using it before. Am I missing something?
    Here's my stylesheet:
    http://www.columbiamistalpacas.com/i...stylesheet.css

    And a link to the w3 validation results
    http://jigsaw.w3.org/css-validator/v...stalpacas.com/
  2. #2
  3. Retired
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2002
    Location
    Finland
    Posts
    9,143
    Rep Power
    2493
    In your style sheet is should be somethng like this:
    Code:
    font: normal 0.8em "Tahoma", Arial, sans-serif;
    HTH

    Cheers,
    Jamie

    >_ skiFFie ? | Twitter

    __________________

    Let the might of your compassion arise to bring a quick end
    to the flowing stream of the blood and tears .....
    Please hear my anguished words of truth.

    __________________
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Location
    Pennsylvania
    Posts
    31
    Rep Power
    11
    Why? What's the difference and what does the normal 0.8em mean? Emphasis? 8 tenths of bold?
  6. #4
  7. Retired
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2002
    Location
    Finland
    Posts
    9,143
    Rep Power
    2493
    font-family is depreciated..

    em is a font size..http://www.google.com/url?sa=U&start...ts.html&e=7417

    Cheers,
    Jamie

    >_ skiFFie ? | Twitter

    __________________

    Let the might of your compassion arise to bring a quick end
    to the flowing stream of the blood and tears .....
    Please hear my anguished words of truth.

    __________________
  8. #5
  9. |<.+#f@#+.&.|
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Mar 2002
    Location
    norway
    Posts
    3,009
    Rep Power
    1224
    Originally posted by jabba_29
    font-family is depreciated..

    where did you read that?
    font-family is still in css2.1
    http://www.w3.org/TR/CSS21/fonts.html#font-family-prop
  10. #6
  11. Retired
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2002
    Location
    Finland
    Posts
    9,143
    Rep Power
    2493
    Oops, I thought you weren't supposed to use it

    Cheers,
    Jamie

    >_ skiFFie ? | Twitter

    __________________

    Let the might of your compassion arise to bring a quick end
    to the flowing stream of the blood and tears .....
    Please hear my anguished words of truth.

    __________________
  12. #7
  13. No Profile Picture
    Standards User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Posts
    146
    Rep Power
    12
    I've tried different variations, changed the fonts specified to: Verdana, Arial, Helvetica, sans-serif (lifted from another stylesheet that validates)
    Added quotes, added sizes. And still the same warning. What am I missing here?
  14. #8
  15. |<.+#f@#+.&.|
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Mar 2002
    Location
    norway
    Posts
    3,009
    Rep Power
    1224
    Code:
    #LeftMenu a {
            ....
    	font-family:Arial;
            ....
    }
    you haven't supplied with a generic class here,
    just add sans-serif after arial.
  16. #9
  17. No Profile Picture
    Standards User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Posts
    146
    Rep Power
    12
    Thanks. That did it.
    Makes sense, it was just throwing me off because it was referencing the Body

IMN logo majestic logo threadwatch logo seochat tools logo