SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Evangelist Worldbuilder's Avatar
    Join Date
    Jan 2004
    Location
    Boston, MA
    Posts
    481
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    My Suckerfish was right, now screwy and erroneous.

    Hi all,

    At this test page I used to have the Suckerfish menu working. Now it's fragged, has 3 generated validator errors, and doesn't work in general. Errors are:
    # Error Line 31 column 8: document type does not allow element "ul" here; assuming missing "li" start-tag.

    <ul>

    # Error Line 39 column 7: document type does not allow element "ul" here; assuming missing "li" start-tag.

    <ul>

    # Error Line 59 column 7: document type does not allow element "ul" here; assuming missing "li" start-tag.

    <ul>
    Can someone have a look and see if you can figure out what I obviously screwed up? I have looked over this code repeatedly to no avail. Thanks!

    Chris

  2. #2
    SitePoint Wizard bronze trophy Tailslide's Avatar
    Join Date
    Feb 2006
    Location
    Bedford, UK
    Posts
    1,687
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You're closing the list item when you've got a sub list below it - they shouldn't close until after the sublist - so you've got this for instance:

    HTML Code:
    <ul id="nav">
    <li><a href="./">Home</a></li>
    <li><a href="#">Company&nbsp;Info</a></li>
    <ul>
    <li><a href="./about.html">About Us</a></li>
    <li><a href="./faq/">F.A.Q.</a></li>
    <li><a href="./testimonials/">Testimonials</a></li>
    <li><a href="./blog/">Company Blog</a></li>
    </ul>
    </li>
    If you remove the unwanted </li> after "Company & Info" and where it appears in other places then it should be ok.
    Little Blue Plane Web Design
    Blood, Sweat & Rust - A Land Rover restoration project

  3. #3
    Word Painter silver trophy Shyflower's Avatar
    Join Date
    Oct 2003
    Location
    Winona, MN USA
    Posts
    10,053
    Mentioned
    142 Post(s)
    Tagged
    2 Thread(s)
    tailslide's advice should work for you if you want to indent part of a list. However, if you want to indent some parts and then go back to your original list try using a definition list instead:

    HTML Code:
    <dl id="nav">
    <dt><a href="./">Home</a></dt>
    <dt><a href="#">Company&nbsp;Info</a></dt>
    <dd><a href="./about.html">About Us</a></dd>
    <dd><a href="./faq/">F.A.Q.</a></dd>
    <dd><a href="./testimonials/">Testimonials</a></dd>
    <dd><a href="./blog/">Company Blog</a></dd>
    <dt> foobar</dt>
    <dt> hello world </dt>
    </dl>
    This list will indent your <dd> tags one more time.

    You can see it here

    It tests valid if you use the Firefox validator tool
    Linda Jenkinson
    "Say what you mean. Mean what you say. But don't say it mean." ~Unknown

  4. #4
    SitePoint Evangelist Worldbuilder's Avatar
    Join Date
    Jan 2004
    Location
    Boston, MA
    Posts
    481
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Many thanks, Tailslide!

    That was driving me nuts and it now roks like a charm.

    Chris


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
  •