Results 1 to 9 of 9

Thread: Drop-down menu with tabbing navigation

  1. #1
    Join Date
    Oct 2007
    Posts
    43
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default Drop-down menu with tabbing navigation

    I'm creating a website which requires a horizontal navigation bar expanding into several drop down menus and sub menus when you hover the mouse over them. Easy so far, I can do that in either CSS or javascript. The problem is that it has to be fully accessible, which means... tabbing navigation. And while I can tab to a menu link in both CSS and javascript, I can't get the menu to actually drop down in either version.

    I'd prefer to use CSS for the menu, which is why I'm posting this here, but if anyone has javascript advice, I'd love to hear it too.

  2. #2
    Join Date
    Oct 2007
    Posts
    43
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    Okay, ten minutes of research lead me to update to Spry 1.6. Sorry folks.

    Although... I'd still like to see if there's a CSS method out there.

  3. #3
    Join Date
    Dec 2007
    Posts
    17
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Hi, I was wondering if you can help me. I've created a horizontal menu bar using seperate images, and I have them using a drop down. Now I want to create a third-tier dropdown from one of the initial dropdown menu items.

    I'm using the AnyLink Drop Down Menu. Can you help me? You can email me if you'd like, or post here.

    Thanks,
    Joe

  4. #4
    Join Date
    Dec 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Horz Menu with 2 sub levels

    I've used CSS Horizontal List Menu- by JavaScript Kit on my site (www.fcps.edu/LangleyHS/). The base code only provides for one sub-menu, but I've adapted the code to allow for a second sub-menu (or a sub sub-menu). The sub sub-menu is offset from the sub-menu using "left: 40px" which can be adjusted as needed.

    This is the code I added for the sub sub-menu which follows /* Sub level menu links style */ in the CSS code:
    Code:
    /*NEW - Sub sub-level menu*/
    .horizontalcssmenu ul li ul li ul{
    left: 0;
    top: 0;
    border-top: 1px solid #202020;
    position: absolute;
    left: 40px; /*this is the offset for the sub sub-menu to allow the sub-menu to be seen*/
    display: block;
    visibility: hidden;
    z-index: inherit;
    }
    
    /*NEW- Sub sub-level menu list items*/
    .horizontalcssmenu ul li ul li ul li{
    display: inherit;
    float: right;
    }
    
    
    /*NEW- Sub sub-level menu links style */
    .horizontalcssmenu ul li ul li ul li a{
    width: 65px; /*width of sub menu levels*/
    display:block;
    font-weight: normal;
    padding: 2px 2px;
    background: #E9B229;
    border-width: 0 1px 1px 1px;
    }
    Your html looks like:
    Code:
    <li><a href="#">Menu Item</a>
    <ul>
           <li><a href="#">First Sub Menu Item</a>
    	<ul>
                  <li><a href="1.html">1st sub sub-menu Item</a></li>
                  <li><a href="2.html">2nd sub sub-menu Item</a></li>
            	<li><a href="3.html">3rd sub sub-menu item</a></li>
            	</ul></li>
            <li><a href="#">Second Sub Menu Item</a>
                  <ul>
                  <li><a href="a.html">1st sub sub-menu Item</a></li>
                  <li><a href="b.html">2nd sub sub-menu Item</a></li>
            	<li><a href="c.html">3rd sub sub-menu tem</a></li>             
            	</ul></li>
        </ul>
    </li>

  5. #5
    Join Date
    Dec 2007
    Posts
    17
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thanks for helping...the only problem is I'm using images as the menu items, instead of just plain text...

    Joe

  6. #6
    Join Date
    Dec 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Not a problem

    You can use an image in place of the text in the menu (with the image still linked). However, you'll need to change the CSS to fit the images you're using (width and height only). I've tested it with images that are all the same size and it works just like the "text" version.

  7. #7
    Join Date
    Dec 2007
    Posts
    17
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thanks alot, i appreciate your time. I'll try it and let you know if it works.

    Two quick questions:

    What if my top nav images aren't all the same width? Where in the CSS would I adjust the code?

    How do I code it in order to have every one of my images sit right next to each other without any spacing?

    Thanks and happy new year,
    Joe

  8. #8
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Have a look at my tutorials on Horizontal Nav Menus with Images. They should explain a bit more. And they are CSS only, which is a bonus
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  9. #9
    Join Date
    Dec 2007
    Posts
    17
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by RuggerRob View Post
    You can use an image in place of the text in the menu (with the image still linked). However, you'll need to change the CSS to fit the images you're using (width and height only). I've tested it with images that are all the same size and it works just like the "text" version.
    Hey Rob, I got the sub levels to work, but m drop downs are each seperated by a space and not resting on top of each other. I looked at the <li> code but I don't see anythng that would affect this.

    Were do I need to adjust the code in order fr the drop down to list without an empty pace between them?

    Thanks for th help,
    Joe

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
  •