Results 1 to 4 of 4

Thread: Adding a second level to horizontal menu

  1. #1
    Member trixiemay's Avatar
    Join Date
    Jan 2009
    Posts
    186

    Default Adding a second level to horizontal menu 4 Jul 2012 @ 02.20

    My site

    Not being a coder, I can't figure out how to add a second submenu to my horizontal jQuery menu. Ideas or suggestions please?

    I realise I need some css styling for the second level but don't know how
      Reply With Quote

  2. #2
    Member trixiemay's Avatar
    Join Date
    Jan 2009
    Posts
    186

    Default 7 Jul 2012 @ 01.27

    I solved it by using by using the free Superfish menu.
    Works a treat!
      Reply With Quote

  3. #3
    New Registered User irfan96's Avatar
    Join Date
    Jan 2013
    Posts
    9

    Default 11 Jan 2013 @ 11.55

    this is the way for adding submenu to a menu.

    HTML Code:
    <nav>
          <ul>
                <li><a href="index.html">Home</a></li>
                <li><a href="lang.html">language</a></li>
                                   <ul>
                                <li><a href="english.html">English</a></li>
                                <li><a href="hindi.html">Hindi</a></li>
                                <li><a href="spanish.html">Spanish</a></li>
                                </ul>
                        <li><a href="service.html">Services</a></li>
                        <li><a href="about.html">About Us</a></li>
                        </ul>
             </nav>
    css:

    Code:
    nav ul ul { background: #5f6975; border-radius: 0px; padding: 0; position: absolute; top: 100%; }
    nav ul ul li { float: none;border-top: 1px solid #6b727c; border-bottom: 1px solid #575f6a;position: relative;}
    nav ul ul li a { padding: 15px 40px;color: #fff;}
    nav ul ul li a:hover { background: #4b545f;}
    Last edited by Frinkky; 11 Jan 2013 at @ 16.02. Reason: Added [html] and [code] tags - please remember to do this in future.
      Reply With Quote

  4. #4
    Administrator Frinkky's Avatar
    Join Date
    Dec 2008
    Posts
    1,817
    Blog Entries
    1

    Default 11 Jan 2013 @ 16.01

    quote
    this is the way for adding submenu to a menu...
    Originally Posted by irfan96 View Post
    I need to correct you on the html structure there, a submenu ul must be a child of an li, not a ul:

    HTML Code:
    <nav>
    	<ul>
    		<li><a href="index.html">Home</a></li>
    		<li><a href="lang.html">language</a><!-- submenu parent start -->
    			<ul><!-- submenu start -->
    				<li><a href="english.html">English</a></li>
    				<li><a href="hindi.html">Hindi</a></li>
    				<li><a href="spanish.html">Spanish</a></li>
    			</ul><!-- submenu end -->
    		</li><!-- sub menu parent end -->
    		<li><a href="service.html">Services</a></li>
    		<li><a href="about.html">About Us</a></li>
    	</ul>
    </nav>
    You may need to edit your css to work correctly, especially if one were to add a sub sub menus.


    P.S. Please also wrap html in bbcode tags. CSS should be wrapped in [code] tags and PHP in [php] tags. Also, proper indentation will make your code easier to read. Thanks.
      Reply With Quote

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •