SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast Redheadskater's Avatar
    Join Date
    Jul 2003
    Location
    USA
    Posts
    80
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help with Validation error

    Hi all!

    I finally decided to get my stylesheet checked by W3 and I was able to correct most of the problems. I'm still getting 2 errors that I do not understand:

    Line: 0 Context : label
    Property font-color doesn't exist : #888888

    Warnings
    URI : http://www.capitolwebdesign.net/capitolwebstyle.css
    Line : 0 font-family: You are encouraged to offer a generic family as a last alternative

    Ok, in my editor I don't have a "Line 0" - and I checked on W3 to make sure that the font color #888888 is a valid web color. They have it listed.....Can someone help me interpret these errors, please?
    Lisa
    ~~~~~~~~~~
    Time flies - it's up to you to be the navigator.

  2. #2
    SitePoint Addict
    Join Date
    Sep 2003
    Location
    Europe
    Posts
    222
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    font-color doesn't exist. It should be color. It says that about label, near the end. In the same label line you specify font-family:arial. Add a sans-serif there (generic font-family, in case someone doesn't have arial installed).

    Also I see you use pt for font-sizes. This is only used for printing. For screen sizes it is best to use em or % (or px if you must).

  3. #3
    SitePoint Enthusiast Redheadskater's Avatar
    Join Date
    Jul 2003
    Location
    USA
    Posts
    80
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by yngwin
    font-color doesn't exist. It should be color. It says that about label, near the end. In the same label line you specify font-family:arial. Add a sans-serif there (generic font-family, in case someone doesn't have arial installed).

    Also I see you use pt for font-sizes. This is only used for printing. For screen sizes it is best to use em or % (or px if you must).

    Thanks for the heads up on the "pt" for font sizes. I have changed them all to px. As for the label - I did change all the color lables to color: and it still says that I have an invalid color. Also, the sans-serif was in line 1 as well, so I'm not sure where they want me to put that.

    Still scratching my head....
    Lisa
    ~~~~~~~~~~
    Time flies - it's up to you to be the navigator.

  4. #4
    Ensure you finish what you sta bronze trophy John Colby's Avatar
    Join Date
    Aug 2003
    Location
    University of Central England, U.K.
    Posts
    487
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Redheadskater
    Thanks for the heads up on the "pt" for font sizes. I have changed them all to px.
    Just had a look at your altered style sheet. If you want transportability and accessibility then using ems or percentage for your font size will be better. Furthermore if you declare something like:

    Code:
    body {
       font-size: 120%;
    }
    
    .tiny {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 70%;
    font-style: normal;
    }
    /* etc etc etc */
    Then changes globally to the size pecentage on the body will reflect in proportion on all other size declarations.

    Easier. Vary the percentages to suit.
    John
    No electrons were harmed during the creation, transmission
    or reading of this posting. However, many were excited and
    some may have enjoyed the experience.

  5. #5
    SitePoint Guru bronze trophy blufive's Avatar
    Join Date
    Mar 2002
    Location
    Manchester, UK
    Posts
    853
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's having a problem with this line:
    HTML Code:
    label {font-size:12px; font-color: #999999; font-family:arial; sans serif}
    There's an instance of font-color in there that you seem to have missed. It's also choking on
    HTML Code:
    font-family: arial; sans serif
    That should be
    HTML Code:
    font-family: arial, sans-serif;

  6. #6
    SitePoint Enthusiast Redheadskater's Avatar
    Join Date
    Jul 2003
    Location
    USA
    Posts
    80
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I finally got it validated! Thanks to all of you for helping me learn this CSS stuff....
    Lisa
    ~~~~~~~~~~
    Time flies - it's up to you to be the navigator.


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
  •