Help with validating "cannot be checked"

Discussion in 'HTML & Website Design' started by ImaginaryOrdinary, Jul 18, 2008.

  1. #1
    Hi folks,

    I am having a wee bit of trouble here. I am trying to validate my site, http://www.onbaseplusslugging.com , and am getting an error.

    " Sorry, I am unable to validate this document because on line 9 it contained one or more bytes that I cannot interpret as utf-8 (in other words, the bytes found are not valid values in the specified Character Encoding). Please check both the content of the file and the character encoding indication.

    The error was: utf8 "\x96" does not map to Unicode "

    http://validator.w3.org/check?uri=h...(detect+automatically)&doctype=Inline&group=0

    Any idea what I can do? Thanks!
     
    ImaginaryOrdinary, Jul 18, 2008 IP
  2. ayaw

    ayaw Peon

    Messages:
    164
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I got this when viewing your pages source

    <!� leave this for stats �>
    
    Code (markup):
    I think removing it will be good.
     
    ayaw, Jul 18, 2008 IP
  3. ImaginaryOrdinary

    ImaginaryOrdinary Guest

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Ah, okay. Of course!

    Now I have 21 errors. LOL. :eek:

    And they don't "look" wrong to me. Can someone help with these errors I am getting?
     
    ImaginaryOrdinary, Jul 18, 2008 IP
  4. hans

    hans Well-Known Member

    Messages:
    2,923
    Likes Received:
    126
    Best Answers:
    1
    Trophy Points:
    173
    #4
    always start TOP to bottom to solve your errors !!
    one top error solved may make other follow up errors disappear.
    so far ALL remaining few dozen errors are self explaining in the validation report.

    check ALL your hand-modified code such as

    <head profile="http://gmpg.org/xfn/11?>

    the ? most likely needs to be a "
    after that done - MOST of the follow up errors will disappear miraculously!

    in addition - review your reasons why you want to have DTD/xhtml1-strict.dtd may be DTD/xhtml1-transitional.dtd may make your life easier as a novice HTML designer.
    see
    http://www.w3.org/TR/xhtml1/#a_dtd_XHTML-1.0-Transitional

    errorrs like
    div align="center"

    obvious: change to div class="center"
    and modify your external CSS accordingly

    in links: target does NOT exist as far as I know. just remove all target="_new"

    as a general and absolute rule:
    never copy / paste text from any source into any other source unless you are sure that all texts copied are CREATED by the same charset encoding. simply changing the coding in a HTML file is wrong procedure. text copied in ONE charset page needs to be CONVERTED using proper tools/procedures when inserted into a page with a totally different charset encoding. this may explain the original error posted.
     
    hans, Jul 18, 2008 IP
  5. ImaginaryOrdinary

    ImaginaryOrdinary Guest

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks a lot Hans. 100% validated.

    However, I have one small problem. I can't get it to center.
    #centerbody {
    	text-align:center; margin-left:auto; margin-right:auto; width:auto;
    }
    Code (markup):
    That's what I have in my ID.
     
    ImaginaryOrdinary, Jul 19, 2008 IP
  6. Masim man

    Masim man Active Member

    Messages:
    73
    Likes Received:
    4
    Best Answers:
    2
    Trophy Points:
    58
    #6
    Here's the css to centering a div.

    margin:0 auto;
     
    Masim man, Jul 19, 2008 IP
  7. ImaginaryOrdinary

    ImaginaryOrdinary Guest

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Hmm, does not center it. Wonder what I'm doing wrong.
     
    ImaginaryOrdinary, Jul 19, 2008 IP
  8. hans

    hans Well-Known Member

    Messages:
    2,923
    Likes Received:
    126
    Best Answers:
    1
    Trophy Points:
    173
    #8
    you have a CSS conflict
    because:

    in your CSS you define body margin already
    body
    {
    font-family: Verdana, Tahoma;
    font-size: 12px;
    background: #d2c382;
    text-align:center;margin:0 auto;

    }

    hence margin 0

    later however you want to have it centered = conflict!

    either define your body margins in your body and remove the "centerbody"
    or remove margins in your body CSS and define all in your "centerbody"

    for additional CSS reference - pls see
    http://www.w3.org/TR/REC-CSS1
    and
    http://www.w3.org/TR/REC-CSS2/
     
    hans, Jul 19, 2008 IP
  9. ImaginaryOrdinary

    ImaginaryOrdinary Guest

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Okay, so I took it out of the body, but it's still not centered.
     
    ImaginaryOrdinary, Jul 19, 2008 IP
  10. Masim man

    Masim man Active Member

    Messages:
    73
    Likes Received:
    4
    Best Answers:
    2
    Trophy Points:
    58
    #10
    I've just viewed your css, you should insert the width of your document here:

    #centerbody {
    width: 900px;margin:0 auto;
    }

    or you can insert it to the #wrap and remove #centerbody from your document.

    #wrap
    {
    margin: 15px auto;
    ...
    }
     
    Masim man, Jul 19, 2008 IP
  11. ImaginaryOrdinary

    ImaginaryOrdinary Guest

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Doh! Thanks Masim! Fixed!
     
    ImaginaryOrdinary, Jul 19, 2008 IP
  12. Cri2T

    Cri2T Peon

    Messages:
    104
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #12

    Not a conflict. If you define something in CSS and then define it later on in the document, it does something called "Re Defining" basically overwriting the previous value.

    IE:

    .test{ background: #000; }

    blah blah

    .test{ background: #fff; }

    Your background will be white, not black.

    The problem was that he was using an auto value for the width. You need fixed width or a percentage for it to center correctly.
     
    Cri2T, Jul 19, 2008 IP
  13. ImaginaryOrdinary

    ImaginaryOrdinary Guest

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #13
    ImaginaryOrdinary, Jul 20, 2008 IP
  14. Cri2T

    Cri2T Peon

    Messages:
    104
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #14
    Cri2T, Jul 20, 2008 IP
  15. ImaginaryOrdinary

    ImaginaryOrdinary Guest

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #15
    Thanks. Brain fart :D
     
    ImaginaryOrdinary, Jul 20, 2008 IP