SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Member
    Join Date
    May 2008
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Why this page doesn't valid?!

    Hello Dear,

    Why this page doesn't valid?!

    Code:
    taavonshop.com/textile/index.php
    If you see Source Code, you can see that allof div tag is correct.

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,269
    Mentioned
    196 Post(s)
    Tagged
    2 Thread(s)
    I see you've fixed it already
    W3C CSS Validator results for http://taavonshop.com/textile/index.php (CSS level 2.1)
    Congratulations! No Error Found.

    This document validates as CSS level 2.1 !
    EDIT: Or are you referring to the mark-up and not the CSS?
    Line 70, Column 27: end tag for element "div" which is not open.
    </div><br class="c" /></div>

  3. #3
    SitePoint Member
    Join Date
    May 2008
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, but no CSS validation. I need Markup Validation Service Check the markup (HTML, XHTML, …) of Web documents.

    I give this error:

    Code:
    Errors found while checking this document as XHTML 1.0 Transitional!
    Result: 	3 Errors

  4. #4
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,269
    Mentioned
    196 Post(s)
    Tagged
    2 Thread(s)
    It would seem there's a mistake in the way the tags are nested. The best way I know of seeing these mistakes (short of using something that highlights code and indicates errors for you) is to use indentation, going in for a child and back out when it closes. i.e.
    HTML Code:
    <body>
      <div>
        <h3>
          Text
        </h3>
        <div>
          <span>
            Text
          </span>
          <div>
            <img />
          </div>
        </div>
      </div>
    </body>

  5. #5
    SitePoint Member
    Join Date
    May 2008
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Mittineague View Post
    It would seem there's a mistake in the way the tags are nested. The best way I know of seeing these mistakes (short of using something that highlights code and indicates errors for you) is to use indentation, going in for a child and back out when it closes. i.e.
    HTML Code:
    <body>
      <div>
        <h3>
          Text
        </h3>
        <div>
          <span>
            Text
          </span>
          <div>
            <img />
          </div>
        </div>
      </div>
    </body>
    If you see Source Code, you can see that allof div tag is correct.

  6. #6
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,269
    Mentioned
    196 Post(s)
    Tagged
    2 Thread(s)
    Sorry, but when I view-source, I don't see any indentation, so I can't "see" that they're all correct.

    I see mark-up like
    HTML Code:
    <div class="c" /></div></div></div><div id="MBLeft">
    not like
    HTML Code:
          <div class="c" />
        </div>
      </div>
    </div>
    <div id="MBLeft">

  7. #7
    SitePoint Member
    Join Date
    Aug 2008
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Replace
    Code:
    </div><br class="c" /></div>
    
    <div id="BottomAds"><div id="BARight">
    with
    Code:
    </div><br class="c" />
    
    <div id="BottomAds"><div id="BARight">

  8. #8
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,269
    Mentioned
    196 Post(s)
    Tagged
    2 Thread(s)
    Although Firebug does suggest there's a problem around the BottomAds div, by my count there are 32 opening div tags and 32 closing div tags. If so, then the problem isn't an unpaired tag (one extra or one missing), but most likely that they are incorrectly nested.

    EDIT: as at least one of the opening div tags is an "empty", "self-closing" tag, i.e. "<div />", that would make an extra closing tag. http://www.sitepoint.com/forums/show...52&postcount=6

  9. #9
    SitePoint Member
    Join Date
    May 2008
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Buguletzu View Post
    Replace
    Code:
    </div><br class="c" /></div>
    
    <div id="BottomAds"><div id="BARight">
    with
    Code:
    </div><br class="c" />
    
    <div id="BottomAds"><div id="BARight">
    Thanks.

    Although Firebug does suggest there's a problem around the BottomAds div, by my count there are 32 opening div tags and 32 closing div tags. If so, then the problem isn't an unpaired tag (one extra or one missing), but most likely that they are incorrectly nested.

    EDIT: as at least one of the opening div tags is an "empty", "self-closing" tag, i.e. "<div />", that would make an extra closing tag.
    Thanks, what do i do now for slove problem?

  10. #10
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,269
    Mentioned
    196 Post(s)
    Tagged
    2 Thread(s)
    You have either an extra closing div tag, or the "self-closing" tag should be an open tag. Once you indent the tags according to nesting level (using a tab instead of spaces might make it easier for you to spot the mistake) knowing which one to remove will be clear to you. Otherwise try your luck and hope it doesn't break the page. "Retro-indenting" can be somewhat tedious, but I think you'll agree the advantages of indenting your code blocks to make them easier to read is worth the effort. Luckily, the page in question isn't that long imagine the problem you would have for something 10 times as long.

    Also, even though the names like "BottomAds" are descriptive, don't be afraid to put a comment or two where they will help you remember what's going on. eg.
    HTML Code:
    <!-- Top Header start -->
    <div>
      <img/>
      <!-- Top Navigation -->
      <div>
        <ul>
          <li><a .....
          <li><a ....
        </ul>
      </div><!-- End Top Navigation -->
    </div><!-- End Top Header -->
    
    <!-- Main Content -->
    <!-- Left Column -->

  11. #11
    SitePoint Member
    Join Date
    May 2008
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Mittineague.


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
  •