Results 1 to 2 of 2

Thread: Sub menu problem

  1. #1
    Join Date
    Oct 2010
    Posts
    14
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Sub menu problem

    For some reason, I can't figure out, I can't add a sub menu. I'm using
    jQuery Multi Level CSS Menu #2.
    In the website link below is a menu link 'Training Courses'. Below that is drop down link 'Geometrical Tolerancing'. I want to create a sub menu from that link but every time I try it goes all wrong. Can anyone explain how I can do this please?

    http://www.sunridgegraphics.co.uk/mac

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    I think you need to revisit the script page and look at the example code again (you didnt provide a link but it appears to be this one: http://www.dynamicdrive.com/style/cs...el_css_menu_2/ )

    The example shows one lowest level list with nested lists for sub-menus.
    Yours shows many lowest level lists each with their own scrambled nested lists for sub-menus. You closing tags are all over the place so that why you're having problems.

    The colours might help you understand the nesting method a little better;

    Code:
    <ul>
    <li><a href="http://www.dynamicdrive.com">Item 1</a></li>
    <li><a href="#">Item 2</a></li>
    <li><a href="#">Folder 1</a>
      <ul>
      <li><a href="#">Sub Item 1.1</a></li>
      <li><a href="#">Sub Item 1.2</a></li>
      <li><a href="#">Sub Item 1.3</a></li>
      <li><a href="#">Sub Item 1.4</a></li>
      </ul>
    </li>
    <li><a href="#">Item 3</a></li>
    <li><a href="#">Folder 2</a>
      <ul>
      <li><a href="#">Sub Item 2.1</a></li>
      <li><a href="#">Folder 2.1</a>
        <ul>
        <li><a href="#">Sub Item 2.1.1</a></li>
        <li><a href="#">Sub Item 2.1.2</a></li>
        <li><a href="#">Folder 3.1.1</a>	
    	<ul>
        	<li><a href="#">Sub Item 3.1.1.1</a></li>
        	<li><a href="#">Sub Item 3.1.1.2</a></li>
        	<li><a href="#">Sub Item 3.1.1.3</a></li>
        	<li><a href="#">Sub Item 3.1.1.4</a></li>
        	<li><a href="#">Sub Item 3.1.1.5</a></li>
    	</ul>
        </li>
        <li><a href="#">Sub Item 2.1.4</a></li>
        </ul>
      </li>
      </ul>
    </li>
    <li><a href="http://www.dynamicdrive.com/style/">Item 4</a></li>
    </ul>
    So, its one base-level list (black).
    The first level nested lists (purple and blue) are the first level sub-menus.
    The blue first level nested list then contains another red nested list, which in turn contains a further green nested list, forming a 2nd sub-menu and 3rd sub-menu respectively.

    This is the format you should use when you code your menu.
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

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
  •