SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Evangelist
    Join Date
    Jul 2003
    Location
    uk
    Posts
    503
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    validation errors with TR (was "Small prob")

    A file of mine keeps up bringing up 2 errors even tho it seems the code is fine?

    The first error is

    Nesting error, "tr" should be closed before closing "table"[XHTML 1.0 transitional]
    The code is

    Code:
     <tr>
          <td><img src="images/spacer.gif" width="81" height="1" alt="" /></td>
    
          <td><img src="images/spacer.gif" width="77" height="1" alt="" /></td>
    
          <td><img src="images/spacer.gif" width="27" height="1" alt="" /></td>
    
          <td><img src="images/spacer.gif" width="80" height="1" alt="" /></td>
    
          <td><img src="images/spacer.gif" width="109" height="1" alt="" /></td>
    
          <td><img src="images/spacer.gif" width="107" height="1" alt="" /></td>
    
          <td><img src="images/spacer.gif" width="112" height="1" alt="" /></td>
    
          <td><img src="images/spacer.gif" width="86" height="1" alt="" /></td>
    
          <td><img src="images/spacer.gif" width="121" height="1" alt="" /></td>
        </tr>
      </table>
    The tr tag IS closed before the table tag?

    The 2nd error is

    The tag:"tr" is not allowed within: "tr" It is only allowed within: table, tbody, tfoot, thead.[XHTML 1.0 transitional]
    The tr in question is the one at the start of the first code I gave you, its not within another 'tr', the previous 'tr' is also closed.

    This is full code

    Code:
    <style type="text/css">
    /*<![CDATA[*/
     body {
      background-color: #242424;
     }
     div.c3 {text-align: right}
     td.c2 {border: 1px solid #5f5f5f;border-top-width:0px;border-left-width:0px;border-right-width:0px;}
     td.c1 {border: 1px dotted #000000}
    /*]]>*/
    </style>
      <table width="800" border="0" cellpadding="0" cellspacing="0" align="center">
        <tr>
          <td colspan="9"><img src="images/layout_01.gif" width="800" height="143" alt="" /></td>
        </tr>
    
        <tr>
          <td colspan="9"><img src="images/layout_10.gif" width="800" height="2" alt="" /></td>
        </tr>
    
        <tr>
          <td colspan="9"><img src="images/layout_11.gif" width="800" height="1" alt="" /></td>
        </tr>
    
        <tr>
          <td colspan="9" bgcolor="#ABABAB">
            <table cellpadding="3" cellspacing="0" width="100%">
              <tr>
                <td align="center">
        <script type="text/javascript"><!--
    google_ad_client = "pub-8178224563442432";
    google_ad_width = 728;
    google_ad_height = 90;
    google_ad_format = "728x90_as";
    google_ad_type = "text";
    google_ad_channel ="";
    google_color_border = "ABABAB";
    google_color_bg = "ABABAB";
    google_color_link = "FFFFFF";
    google_color_text = "FFFFFF";
    google_color_url = "FFFFFF";
    //--></script>
    <script type="text/javascript"
      src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script>          </td>
              </tr>
            </table>
    
            <table cellpadding="0" cellspacing="5" width="100%">
    
              <tr>          </tr>
            </table>
            </td>
    
    
    
    
        <tr>
          <td><img src="images/spacer.gif" width="81" height="1" alt="" /></td>
    
          <td><img src="images/spacer.gif" width="77" height="1" alt="" /></td>
    
          <td><img src="images/spacer.gif" width="27" height="1" alt="" /></td>
    
          <td><img src="images/spacer.gif" width="80" height="1" alt="" /></td>
    
          <td><img src="images/spacer.gif" width="109" height="1" alt="" /></td>
    
          <td><img src="images/spacer.gif" width="107" height="1" alt="" /></td>
    
          <td><img src="images/spacer.gif" width="112" height="1" alt="" /></td>
    
          <td><img src="images/spacer.gif" width="86" height="1" alt="" /></td>
    
          <td><img src="images/spacer.gif" width="121" height="1" alt="" /></td>
        </tr>
      </table>
    Any ideas because as I said it seems the tags are closed?

    Thnx

  2. #2
    Non-Member Egor's Avatar
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    7,305
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Code:
            </td>
    
    
    
    
        <tr>
    Does this look right to you?

  3. #3
    SitePoint Evangelist
    Join Date
    Jul 2003
    Location
    uk
    Posts
    503
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well I dont actually know much HTML, I guess both should be deleted?

  4. #4
    Non-Member Egor's Avatar
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    7,305
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Ah I see, Ross. My apologies. Here:

    HTML Code:
      <table width="800" border="0" cellpadding="0" cellspacing="0" align="center">
        <tr>
          <td colspan="9"><img src="images/layout_01.gif" width="800" height="143" alt="" /></td>
        </tr>
    
        <tr>
          <td colspan="9"><img src="images/layout_10.gif" width="800" height="2" alt="" /></td>
        </tr>
    
        <tr>
          <td colspan="9"><img src="images/layout_11.gif" width="800" height="1" alt="" /></td>
        </tr>
    
        <tr>
          <td colspan="9" bgcolor="#ABABAB">
            <table cellpadding="3" cellspacing="0" width="100%">
              <tr>
                <td align="center">
                  <script type="text/javascript">
                    <!--
                    google_ad_client = "pub-8178224563442432";
                    google_ad_width = 728;
                    google_ad_height = 90;
                    google_ad_format = "728x90_as";
                    google_ad_type = "text";
                    google_ad_channel ="";
                    google_color_border = "ABABAB";
                    google_color_bg = "ABABAB";
                    google_color_link = "FFFFFF";
                    google_color_text = "FFFFFF";
                    google_color_url = "FFFFFF";
                    //-->
                  </script>
                  <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
                </td>
              </tr>
            </table>
          </td>
        </tr>
            
        <tr>
          <td><img src="images/spacer.gif" width="81" height="1" alt="" /></td>
          <td><img src="images/spacer.gif" width="77" height="1" alt="" /></td>
          <td><img src="images/spacer.gif" width="27" height="1" alt="" /></td>
          <td><img src="images/spacer.gif" width="80" height="1" alt="" /></td>
          <td><img src="images/spacer.gif" width="109" height="1" alt="" /></td>
          <td><img src="images/spacer.gif" width="107" height="1" alt="" /></td>
          <td><img src="images/spacer.gif" width="112" height="1" alt="" /></td>
          <td><img src="images/spacer.gif" width="86" height="1" alt="" /></td>
          <td><img src="images/spacer.gif" width="121" height="1" alt="" /></td>
        </tr>
      </table>
    All you really needed to do was close a TR (in the middle of the code I posted before).

  5. #5
    SitePoint Evangelist
    Join Date
    Jul 2003
    Location
    uk
    Posts
    503
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks


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
  •