SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    The I's for intelligent silver trophy iTechno's Avatar
    Join Date
    Jan 2006
    Location
    Yorkshire, UK
    Posts
    1,796
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Why dosen't it validate?

    I get the errors

    # Error Line 1103, column 6: document type does not allow element "tbody" here .

    <tbody>

    The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

    One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).


    # Error Line 1111, column 54: document type does not allow element "tbody" here .

    <tbody id="collapseobj_forumhome_activeusers" style="">


    # Error Line 1123, column 6: document type does not allow element "tbody" here .

    <tbody>


    # Error Line 1131, column 53: document type does not allow element "tbody" here .

    <tbody id="collapseobj_forumhome_todayusers" style="">


    # Error Line 1139, column 6: document type does not allow element "tbody" here .

    <tbody>


    # Error Line 1147, column 48: document type does not allow element "tbody" here .

    <tbody id="collapseobj_forumhome_stats" style="">
    HTML Code:
    # <!-- what's going on box -->
    # <table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
    # <tr>
    # <td class="tcat" colspan="2">What's Going On?</td>
    # </tr>
    #
    # <!-- logged-in users -->
    # <tbody>
    # <tr>
    # <td class="thead" colspan="2">
    # <a style="float:right" href="#top" onclick="return toggle_collapse('forumhome_activeusers')"><img id="collapseimg_forumhome_activeusers" src="np/buttons/collapse_thead.gif" alt="" border="0" /></a>
    # <a href="online.php?" rel="nofollow">Currently Active Users</a>: 2 (1 members and 1 guests)
    # </td>
    # </tr>
    # </tbody>
    # <tbody id="collapseobj_forumhome_activeusers" style="">
    # <tr>
    # <td class="alt2"><a href="online.php?" rel="nofollow"><img src="np/misc/whos_online.gif" alt="View Who's Online" border="0" /></a></td>
    # <td class="alt1" width="100%">
    # <div class="smallfont">
    # <div style="white-space: nowrap">Most users ever online was 2, Today at 01:41 AM.</div>
    # <div><a href="member.php?amp;u=1" rel="nofollow">Matt</a></div>
    # </div>
    # </td>
    # </tr>
    # </tbody>
    # <!-- end logged-in users --><!-- who has visited -->
    # <tbody>
    # <tr>
    # <td class="thead" colspan="2">
    # <a style="float:right" href="#top" onclick="return toggle_collapse('forumhome_todayusers')"><img id="collapseimg_forumhome_todayusers" src="np/buttons/collapse_thead.gif" alt="" border="0" /></a>
    # Total members that have visited the forum today: 1
    # </td>
    # </tr>
    # </tbody>
    # <tbody id="collapseobj_forumhome_todayusers" style="">
    # <tr>
    # <td class="alt2"><a href="memberlist.php"><img src="np/misc/whos_online.gif" alt="" border="0" /></a></td>
    # <td class="alt1" width="100%"><div class="smallfont"><a rel="nofollow" href='member.php?u=1' title='01:41 AM' >Matt</a></div></td>
    # </tr>
    # </tbody>
    # <!-- end who has visited -->
    #
    # <tbody>
    # <tr>
    # <td class="thead" colspan="2">
    # <a style="float:right" href="#top" onclick="return toggle_collapse('forumhome_stats')"><img id="collapseimg_forumhome_stats" src="np/buttons/collapse_thead.gif" alt="" border="0" /></a>
    # NintendoPoint.com - #1 for Wii, DS, GBA, Gamecube, Retro Statistics
    # </td>
    # </tr>
    # </tbody>
    # <tbody id="collapseobj_forumhome_stats" style="">
    # <tr>
    # <td class="alt2"><img src="np/misc/stats.gif" alt="NintendoPoint.com - #1 for Wii, DS, GBA, Gamecube, Retro Statistics" border="0" /></td>
    # <td class="alt1" width="100%">
    # <div class="smallfont">
    # <div>
    # Threads: 0,
    # Posts: 0,
    # Members: 3,
    # <span title="Within the Last 30 Days">Active Members: 3</span>
    #
    # </div>
    # <div>Welcome to our newest member, <a href="member.php?amp;u=3" rel="nofollow">TomH</a></div>
    # </div>
    # </td>
    # </tr>
    # </tbody>
    
    </table>
    Cheers for all and any help

  2. #2
    doing my best to help c2uk's Avatar
    Join Date
    May 2005
    Location
    Cardiff
    Posts
    1,832
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If I remember correctly, there is only one tbody, one thead and one tfoot allowed per table and it has to be in this order:
    thead, tfoot, tbody.
    Dan G
    Marketing Strategist & Consultant

  3. #3
    SitePoint Wizard chris_fuel's Avatar
    Join Date
    May 2006
    Location
    Ventura, CA
    Posts
    2,750
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    What specific DTD are you using? Can you post the DOCTYPE so I can take a look?

  4. #4
    SitePoint Evangelist
    Join Date
    Apr 2003
    Location
    Lexington, KY
    Posts
    438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by c2uk
    If I remember correctly, there is only one tbody, one thead and one tfoot allowed per table and it has to be in this order:
    thead, tfoot, tbody.

    I thoguht you could have all the TBODY's you want, but if you use one then you've got to have at least one THEAD, no?



    -Michael

  5. #5
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can have as many TBODY elements as you like in a table. Your problem is that you have a TR as an immediate child of the table, preceding the first TBODY. That's not allowed.

    You either have no <tbody> tag (i.e., TR as immediate children of TABLE) or your table has only TBODY children (after any CAPTION, column specifications, THEAD and/or TFOOT).

    That first line looks like it should be a CAPTION rather than a row, but if you want to keep it as a row, enclose it in a THEAD element.
    Birnam wood is come to Dunsinane


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
  •