SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict Kysmiley's Avatar
    Join Date
    Dec 2004
    Location
    Isonville KY
    Posts
    304
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    W3C and font colors

    Is there some kind of CSS rule or suggestion not to use words for font colors. I am using black and red and the validator on W3C those colors dont exist
    Pat

  2. #2
    SitePoint Enthusiast devonmallory's Avatar
    Join Date
    Apr 2005
    Location
    Toronto, Canada
    Posts
    45
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile

    How/where are you writing it?

    These are all valid ways to write the same thing:
    color: black;
    color: #000000;
    color: #000;
    color: rgb(0, 0, 0);
    color: rgb(0%, 0%, 0%);

    There are 17 keyword color names (including black and red) recognized in the CSS2 spec, all of them should validate the same as any of the other methods above.

    If you've tried these, post some of your CSS to make it easier to help.

  3. #3
    SitePoint Addict Kysmiley's Avatar
    Join Date
    Dec 2004
    Location
    Isonville KY
    Posts
    304
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    First i used short form and use like font-size: 14px; black; then i changed it to font-color: black; and it still rejected it same with the red color yet the purple color and the white color it never bothered mentioning.
    Pat

  4. #4
    SitePoint Addict Kysmiley's Avatar
    Join Date
    Dec 2004
    Location
    Isonville KY
    Posts
    304
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I decided to run the CSS thru the validator tonight alo0ng with the other pages on the site. On my laptop it looks good yet when i go to my in-laws headers and footers are out of line other stuff is all messed up and they have the same O/S as me with the same resolution and a 15in monitor so i am confused why it looks good on here and others tell me on theirs it looks good yet the in-laws it looks crappy
    Pat

  5. #5
    SitePoint Enthusiast devonmallory's Avatar
    Join Date
    Apr 2005
    Location
    Toronto, Canada
    Posts
    45
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ahh.
    There is no font-color property in CSS. You just use color: red, not font-color: red.

    The error you are getting from the validator is actually saying that there is no property called "font-color", not that there is no value called "red"

  6. #6
    SitePoint Addict Kysmiley's Avatar
    Join Date
    Dec 2004
    Location
    Isonville KY
    Posts
    304
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ah ok that explains it. Thanks for the reply and help with this
    Pat


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
  •