Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8882199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:31:02+00:00 2026-06-14T20:31:02+00:00

The menus are overlapping onto other menus. When you click the first menu About

  • 0

The menus are overlapping onto other menus. When you click the first menu “About Us” it opens. But when you click “Products”, the “About Us” don’t close so the “Products” menu overlaps to “About Us” menu.

jsfiddle

HTML

<body>
<nav>
   <ul class="nav">
        <li><a href="#"></a></li>
        <li class="menuabout"><a>About</a>
             <ul class="subnav01 clearfix">
                  <li><a href="#">About One</a></li>
                  <li><a href="#">About Two</a></li>
                  <li><a href="#">About Three</a></li>
                  <li><a href="#">About Four</a></li>
                  <li><a href="#">About Five</a></li>
                  <li><a href="#">About Six</a></li>
             </ul>
        </li>
        <li class="menuproducts"><a>Products</a>
             <ul class="subnav02 clearfix">
                  <li><a href="#">Product One</a></li>
                  <li><a href="#">Product Two</a></li>
                  <li><a href="#">Product Three</a></li>
                  <li><a href="#">Product Four</a></li>
                  <li><a href="#">Product Five</a></li>
                  <li><a href="#">Product Six</a></li>
             </ul>
        </li>
        <li><a href="#">Services</a></li>
        <li><a href="#">Contact</a></li>
   </ul>             
</nav>

​

CSS

* {
    margin: 0;
    padding: 0;
}

body {
    width: 100%;
    height: 100%;
    background: darkgray;
}

.nav {
    width: 100px;
    position: absolute;
    top: 30px;
    right: 20px;
    list-style: none;
}

.nav li {
    margin: 0 0 10px 0;
    font-family: Helvetica;
    font-size: 11px;
    text-align: right;
    text-transform: uppercase;
    line-height: 1;
}

.nav li:nth-child(5) {
    margin: 0;
}

.nav li a {
    height: 10px;
    padding: 10px 10px 10px 0;
    color: white;
    text-decoration: none;
    display: block;
    cursor: pointer;
    position: relative;
}

.subnav01, .subnav02 {
    width: 300px;
    position: absolute;
    top: 29px;
    left: -300px;
    display: none;
}
.subnav01 li, .subnav02 li {
    width: 150px;
    margin: 0;
    text-align: center;
    float: left;
}

.subnav01 li a, .subnav02 li a {
    -webkit-transition: all 0.5s ease;
    -moz-transition: all 0.5s ease;
    -ms-transition: all 0.5s ease;
    -o-transition: all 0.5s ease;
    transition: all 0.5s ease;
    background: dodgerblue;
    height: 10px;
    display:block;
}

.subnav01 li a:hover, .subnav02 li a:hover {
    background: dimgray;
}

.clearfix:before,
.clearfix:after {
    content: " "; /* 1 */
    display: table; /* 2 */
}

.clearfix:after {
    clear: both;
}

.active > a {
    background: dodgerblue !important;
}​

JS/jQuery/jQuery UI/

jQuery(document).ready(function($){
    $(".menuabout").on("click", function(){
        $(".subnav01").toggle ("slide", {direction: "right"}, "slow");
        $(this).toggleClass("active");
    });
    $(".menuproducts").on("click", function(){
        $(".subnav02").toggle ("slide", {direction: "right"}, "slow");
        $(this).toggleClass("active");
    });
});​
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T20:31:03+00:00Added an answer on June 14, 2026 at 8:31 pm

    well you can try something like this. I’ve changed you class to menu for all menu elements, so you can use one function for all of them

    JSFIDDLE

    jQuery(document).ready(function($){
        $(".menu").on("click", function(){
            deactivateAll(this);
            toggle(this);
        });
    
        function deactivateAll(current) {
            $( "li" ).each(function( index, elem ){
                if (elem != current && $(elem).hasClass("active")) {
                    toggle(elem);
                }
            });
        }
    
        function toggle(elem) {
            $(elem).find("ul").toggle ("slide", {direction: "right"}, "slow");
            $(elem).toggleClass("active");
        }
    });​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason, I am getting a weird overlapping dropdown menu glitch. It works
Why don't my dropdown-menus drop down? I am unfamiliar with using style sheets and
Context menus seem to have a default white background. This looks pretty nice, but
How do I center the red and yellow blue buttons within #top-menu ? http://jsfiddle.net/qhoc/qKXD2/
I have some custom dropdown css/jquery menus that are not overlapping (covering) some text
Why is my UL menu overlapping with the content div? Am I missing part
Hi – for some reason 2 of my menu items are overlapping in ie8
I am finding numerous CSS tutorials that are great for overlapping tabs but none
Blog link: http://confabtest.blogspot.co.uk/ The navbard on my blog is overlapping other elements such as
I have created two menus, a horizontal drop-down and a vertical menu, these both

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.