Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 11 of 11
  1. #1
    New to the CF scene
    Join Date
    Jan 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy css want validate in validator. What am I doing wrong?

    Hello Coders,
    First let me say I wish everyone a profitable and happy new year.
    Now that is out of the way here is my problem, the code and what the Validator spits back at me. I've been working on this style sheet for a while and I'm clueless.
    Here's the code:
    body { background-color:#fff ;
    font-family:Verdana, Arial, Helvetica, sans-serif;
    font-size:12px;
    color:#000;
    }

    a:hover { font-family:Verdana, Arial, Helvetica, sans-serif;
    color:#000;
    background-color: white}

    h1 { font-family:Verdana, Arial, Helvetica, sans-serif;
    font-size:36px}

    h2 { font-family:Verdana, Arial, Helvetica, sans-serif;
    font-size:30px}

    h3 { font-family:Verdana, Arial, Helvetica, sans-serif;
    font-size:24px}

    #leftcontent { position: absolute;
    left:10px;
    top:192px;
    width:100px;
    background:#ccc;
    border:0px solid ;
    }

    #centercontent { top:192px;
    background:#fff;
    margin-left:99px;
    margin-right:119px;
    border:0px solid ;
    voice-family: "
    \"
    }

    \"
    "
    ;
    voice-family: inherit;
    margin-left:101px;
    margin-right:121px;
    }

    html>
    body #centercontent { margin-left:101px;
    margin-right:121px;
    }

    #rightcontent { position: absolute;
    right:10px;
    top:192px;
    width:120px;
    background:#ccc;
    border:0px solid ;
    }

    #banner { background:#fff;
    height:165px;
    border-top:1px solid #000;
    border-right:1 solid #000;
    border-left:1 solid #000;
    voice-family: "
    \"
    }

    \"
    "
    ;
    voice-family: inherit;
    height:164px;
    }

    html>
    body #banner { height:164px;
    }

    p,h1,h2,h3 { margin:0px 10px 10px 10px;
    }
    Here's the Solution that I'm clueless about, ( I've tried for over 5 hours. Yah, I'm a noob.)
    Line: 34 Context : #centercontent
    Invalid number : voice-family Parse Error - " \"

    Line: 39 Context : "
    Parse Error - " ;

    Line: 46
    Parse Error - : inherit; margin-left:101px; margin-right:121px; } html> body #centercontent

    Line: 61 Context : #banner
    Invalid number : border-right 1 is not a border-color value : 1 solid #000

    Line: 62 Context : #banner
    Invalid number : border-left 1 is not a border-color value : 1 solid #000

    Line: 64 Context : #banner
    Invalid number : voice-family Parse Error - " \"

    Line: 69 Context : "
    Parse Error - " ;

    Line: 75
    Parse Error - : inherit; height:164px; } html> body #banner

    I hope that someone can help me out. I really want to be close to compliant.
    I've worked the original errors down to this and no matter what I do I can't solve the riddle.
    Thanks,
    Befuddled alias Mike

  • #2
    New Coder
    Join Date
    Oct 2005
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    try this (i've modified what you wrote)

    Code:
    body { background-color:#fff ;
    font-family:Verdana, Arial, Helvetica, sans-serif;
    font-size:12px;
    color:#000;
    }
    
    a:hover { font-family:Verdana, Arial, Helvetica, sans-serif;
    color:#000;
    background-color: white}
    
    h1 { font-family:Verdana, Arial, Helvetica, sans-serif;
    font-size:36px}
    
    h2 { font-family:Verdana, Arial, Helvetica, sans-serif;
    font-size:30px}
    
    h3 { font-family:Verdana, Arial, Helvetica, sans-serif;
    font-size:24px}
    
    #leftcontent { position: absolute;
    left:10px;
    top:192px;
    width:100px;
    background:#ccc;
    border:0px solid ;
    }
    
    #centercontent { top:192px;
    background:#fff;
    margin-left:99px;
    margin-right:119px;
    border:0px solid ;
    }
    
    #centercontent { margin-left:101px;
    margin-right:121px;
    }
    
    #rightcontent { position: absolute;
    right:10px;
    top:192px;
    width:120px;
    background:#ccc;
    border:0px solid ;
    }
    
    #banner { background:#fff;
    height:165px;
    border-top:1px solid #000;
    border-right:1 solid #000;
    border-left:1 solid #000;
    }
    
    #banner { height:164px;
    }
    
    p,h1,h2,h3 { margin:0px 10px 10px 10px;
    }
    i got rid of the voice-family as i dont know what it does and i took out some extra stuff, but now it should work without errors, if you wanted voice-family i have know idead how to incooperate it in

    i hope this helps

  • #3
    Senior Coder
    Join Date
    Dec 2004
    Location
    Essex, UK
    Posts
    2,636
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Voice-family is for aural. But certainly things like -

    Code:
    voice-family: "
    \"
    }
    
    \"
    "
    ;
    voice-family: inherit;
    height:164px;
    }
    Are invalid.

  • #4
    New to the CF scene
    Join Date
    Jan 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up Thanks. You did better than I could have.

    Hello goldingh99,
    Thanks for such a quick reply.

    You really helped me and did better than what I could've done with my limited knowledge.

    If you would be so kind could you look at these last two things that stop the CSS from validating.

    Here are the last two from the Validator and they are similiar to the problem
    that I had with border-top.

    Line: 50 Context : #banner
    Invalid number : border-right 1 is not a border-color value : 1 solid #000

    Line: 51 Context : #banner
    Invalid number : border-left 1 is not a border-color value : 1 solid #000.

    I'm a Graphics designer and not a coder. I'm trying to learn, but for a Grandpa it's not easy. LOL.

    Thanks Again,
    Befuddled alias mike

    P.S. If you should need any Graphics done I can return the favor. I just don't like getting something for nothing.

  • #5
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    You need to use units when you are using CSS
    so border-left:1px solid #000; should validate.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #6
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,252
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Tantek hack

    By the way: if you do want to use the Tantek Celik hack:
    Code:
    voice-family: "\"}\""; 
    voice-family:inherit;
    you should realise that this will not validate. With the upcoming IE7, Microsoft officials advice to use IE conditional statements rather than hacks anyway--which probably won't validate either.
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #7
    Senior Coder
    Join Date
    Feb 2003
    Posts
    1,665
    Thanks
    0
    Thanked 27 Times in 25 Posts
    Quote Originally Posted by ronaldb66
    With the upcoming IE7, Microsoft officials advice to use IE conditional statements rather than hacks anyway--which probably won't validate either.
    Why wouldn't they? After all, to everything other than IE/Win, they are just plain SGML comments.
    I've been using CCs for a while to deliver an IE/Win-specific stylesheet and have no problems validating my pages upto XHTML 1.1* served as application/xhtml+xml.
    (* though I typically use XHTML 1.0 Strict.)

  • #8
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,252
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Valid "hacks"

    Bill,

    Thanks for the update: to be honest, I haven't tried them out yet. That they do validate makes using conditional statements an even better alternative--be it only for IE.
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #9
    New to the CF scene
    Join Date
    Jan 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi Aerospace_Eng_ ,
    Thanks for explaining the problem. It worked great and now I know how to handle future problems of this nature.
    Does the proceeding sentence mean that I have to attach this to a web page as I intend to do?
    (To work as intended, your CSS style sheet needs a correct document parse tree. This means you should use valid HTML.) I can live with the warnings. I'm going to make the background color:
    #D8D6D7
    Warnings
    URI : file://localhost/TextArea
    Line : 26 (Level : 1) You have no color with your background-color : #leftcontent
    Line : 31 (Level : 1) You have no color with your background-color : #centercontent
    Line : 45 (Level : 1) You have no color with your background-color : #rightcontent
    Line : 49 (Level : 1) You have no color with your background-color : #banner

    I just want to say that I'm a member of a highly respected business forum and these old stogies (myself included) can learn alot by modeling their forum after this one. The wholehearted and unselfish help that is displayed here is phenomenal - plus the price is right.
    Thanks again for all your help you've all been great.
    Sincerely,
    Befuddled alias Mike

  • #10
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Its saying your CSS is valid but it gives you those warnings for accessibility reasons eg same font color on same font background. You should always declare a background color because not everyone's default background is white.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #11
    New to the CF scene
    Join Date
    Jan 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi Aerospace_Eng_ ,
    Thanks for all your help.
    I put you in for nomination.
    Good luck and may all your endeavors in life be fruitful.
    Sincerely,
    ( No longer Befuddled) alias mike


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •