SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2006
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help with resolving W3C errors

    Would you be able to assist in resolving these errors:
    =====================================

    I cannot work out how to resolve the errors of havig two tags the same name.
    i.e. last.
    This misaligns the calender,any suggestions would be appreciated.
    ====================================

    Below are the results of checking this document for XML well-formedness and validity.

    1. Error Line 41 column 36: ID "last" already defined.

    <li> <a href="dec.html" id="last">Dec</a></li>

    An "id" is a unique identifier. Each time this attribute is used in a document it must have a different value. If you are using this attribute as a hook for style sheets it may be more appropriate to use classes (which group elements) than id (which are used to identify exactly one element).


    2. Info Line 22 column 40: ID "last" first defined here.

    <li> <a href="contact.html" id="last">Contact</a></li>

    3. Error Line 49 column 9: end tag for element "td" which is not open.

    </td>

    The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem.

    If this error occured in a script section of your document, you should probably read this FAQ entry.


    4. Error Line 50 column 9: end tag for element "tr" which is not open.

    </tr>


    5. Error Line 51 column 3: document type does not allow element "tr" here; assuming missing "table" start-tag.

    <tr>


    6. Error Line 52 column 129: there is no attribute "bordercolor".

    ...ding="0" cellspacing="0" bordercolor="#84979C">

    You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

    This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

    How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute.


    7. Error Line 53 column 26: there is no attribute "bordercolor".

    <tr bordercolor="#84979C" bgcolor="#FFCC99">


    8. Error Line 117 column 38: ID "last" already defined.

    <li> <a href="april.html" id="last">Next</a>


    9. Info Line 22 column 40: ID "last" first defined here.

    <li> <a href="contact.html" id="last">Contact</a></li>

    10. Error Line 118 column 18: end tag for "li" omitted, but OMITTAG NO was specified.

    </ul>

    You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".


    11. Info Line 117 column 8: start tag was here.

    <li> <a href="april.html" id="last">Next</a>

    12. Error Line 121 column 5: end tag for "td" omitted, but OMITTAG NO was specified.

    </div>


    13. Info Line 52 column 8: start tag was here.

    <td height="242" valign="top" class="Picture"><table width="100%" border

    14. Error Line 121 column 5: end tag for "tr" omitted, but OMITTAG NO was specified.

    </div>


    15. Info Line 51 column 0: start tag was here.

    <tr>

    16. Error Line 121 column 5: end tag for "table" omitted, but OMITTAG NO was specified.

    </div>


    17. Info Line 51 column 0: start tag was here.

    <tr>

  2. #2
    SitePoint Zealot
    Join Date
    Oct 2003
    Location
    uk
    Posts
    153
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Could probably use some code to iron out all the rest, but the "last" error is becuase you are using an ID multiple times.

    To fix, change the CSS to ".last" instead of "#last" and then call it as a class instead of an ID?

    eg
    Code:
    CSS
    .last {
    ...cssrules...
    }
    
    HTML
    <li> <a href="dec.html" class="last">Dec</a></li>
    <li> <a href="contact.html" class="last">Contact</a></li>

  3. #3
    SitePoint Wizard drhowarddrfine's Avatar
    Join Date
    Aug 2005
    Posts
    3,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    He's already been told this on another forum and has not corrected any of it.

  4. #4
    SitePoint Enthusiast
    Join Date
    Jan 2006
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by drhowarddrfine
    He's already been told this on another forum and has not corrected any of it.
    I have and it did not work , the reason you cannot see it as l have not ftp'd this file. As changing the last to a class ruins the look of the calnder
    Any suggestions?

  5. #5
    SitePoint Enthusiast rev909's Avatar
    Join Date
    Mar 2002
    Location
    Romania
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Put a class instead of an id. A certain id can be used once in a document. You can't have two ids with the same name in the same document...

    Here's the practical solution:

    1. Replace every instance of id="last" with class="last"
    2. In your CSS declaration change #last to .last
    Science is magic that works!
    -- Kurt Vonnegut Jr.

  6. #6
    SitePoint Enthusiast
    Join Date
    Jan 2006
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for that l will do that.

  7. #7
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's what I suggested that you do in your other thread on this subject, and you said it didn't work.
    Birnam wood is come to Dunsinane

  8. #8
    SitePoint Enthusiast rev909's Avatar
    Join Date
    Mar 2002
    Location
    Romania
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    However, what we suggested won't solve all his problems.
    Science is magic that works!
    -- Kurt Vonnegut Jr.


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
  •