SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2007
    Location
    Kent - UK
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help understanding validation please!

    Hi - I have just validated the css on a new site I am working on with the W3C css validator and have got these errors which I don't understand:

    71 #side h3 Family names containing whitespace should be quoted. If quoting is omitted, any whitespace characters before and after the name are ignored and any sequence of whitespace characters inside the name is converted to a single space.
    85 h1 Family names containing whitespace should be quoted. If quoting is omitted, any whitespace characters before and after the name are ignored and any sequence of whitespace characters inside the name is converted to a single space.
    #side h3 {
    font: bold 100%/2em Georgia, Times New Roman, Times, serif;
    padding-left: 10px;
    color: #FF6600;

    h1 {
    font: bold 150% Georgia, Times New Roman, Times, serif;
    color: #ff6600;
    padding-top: 5px;

    Could someone explain what is wrong here - please!!!
    Thanks
    Ann

  2. #2
    SitePoint Guru james_littler's Avatar
    Join Date
    May 2007
    Location
    Portsmouth, UK
    Posts
    775
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    any font-family (or any other element) with more that one word should be within ""

    ie

    h1 {
    font: bold 150% Georgia, Times New Roman, Times, serif;
    color: #ff6600;
    padding-top: 5px;}

    becomes
    h1 {
    font: bold 150% Georgia, "Times New Roman", Times, serif;
    color: #ff6600;
    padding-top: 5px;}

    if it has a - it is fine without "" but if it has a space it needs ""

    hope this helps

  3. #3
    SitePoint Enthusiast
    Join Date
    May 2007
    Location
    Kent - UK
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ahhhhh - I see - thanks for that. Funny though - I am using Dreamweaver 8 and when I run validation on that it doesn't like "Times new Roman" and I have to remove the speech marks. Does explain the W3C comment though. All this validation is making my head spin - doesn't seem quite consistent sometimes

    Thanks Again!

    Ann

  4. #4
    SitePoint Guru james_littler's Avatar
    Join Date
    May 2007
    Location
    Portsmouth, UK
    Posts
    775
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    just a thought...try using font-family: rather than font.... use it the same way you have used font. ie have a few font options just incase your primary isnt supported

  5. #5
    SitePoint Enthusiast
    Join Date
    May 2007
    Location
    Kent - UK
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi James - no W3C doesn't like that either. I think the "Times New Roman" thing with Dreamweaver must be a software bug - so now I know I will put the quotes in which W3C seems happy with.

    Thanks again for your help.

    Ann

  6. #6
    SitePoint Wizard
    Join Date
    Jul 2003
    Location
    Kent
    Posts
    1,921
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I notice neither of your bits of sample code end with a closing }
    Is that what it really does, or just a typo when adding it here?

  7. #7
    SitePoint Guru james_littler's Avatar
    Join Date
    May 2007
    Location
    Portsmouth, UK
    Posts
    775
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    have you tried inline styling on that element to see if that passes validation?


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
  •