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

  • Home
  • SEARCH
  • 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 6327779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:20:25+00:00 2026-05-24T17:20:25+00:00

I have a CSS driven simple drop down menu that can appear in double

  • 0

I have a CSS driven simple drop down menu that can appear in double rows on narrower screens.

When I activate the dropdown of one of the top row items the drop down appears at the same “Z” level as the bottom row.

I thought I’ve set the z-indexes as required but it isn’t working in Chrome, Firefox, Safari or iPhone.

Here is a sample: http://jsfiddle.net/bNBp3/ – “Meat” has a dropdown attached.

<ul id="main-navigation">
    <li><a href="/" title="Go to the Home page"><span>Home</span></a>
    </li>
    <li><a href="/meat/" title="Go to the Meat page"><span>Meat</span></a>
        <ul>
            <li><a href="/meat/bacon/" title="Go to the Bacon page"><span>Bacon</span></a></li>
            <li><a href="/meat/ham/" title="Go to the Ham page"><span>Ham</span></a></li>
            <li><a href="/meat/pork/" title="Go to the Pork page"><span>Pork</span></a></li>
        </ul>
    </li>
    <li><a href="/vegetables/" title="Go to the Vegetables page"><span>Vegetables</span></a>
    </li>
    <li><a href="/about-us/" title="Go to the About Us page"><span>About Us</span></a>
    </li>
    <li><a href="/contact-us/" title="Go to the Contact Us page"><span>Contact Us</span></a>
    </li>
    <li><a href="/a-z/" title="Go to the A-Z page"><span>A-Z</span></a>
    </li>
</ul> 
ul#main-navigation {
    display:block;
    border-bottom:1px solid #ccc;
    margin:0 auto 0px auto;
    min-height:21px;
    padding:0;
    width:100%;
    z-index:11;
    clear:both;
}
ul#main-navigation li {
    display:block;
    float:left;
    list-style:none;
    margin:0 5px 0 0;
    padding:0;
    position:relative;
    z-index:12;
    min-height:22px;
    min-width:30%;
}
ul#main-navigation li a {
    color:#000;
    display:block;
    padding:2px;
    text-decoration:none;
    z-index:13;
}
ul#main-navigation li a.current, ul#main-navigation li a.section {
    color:#fff;
}
ul#main-navigation li ul {
    background:#eee;
    position:absolute;
    left:-1px;
    top:21px;
    display:none;
    overflow:hidden;
    padding:0px;
    z-index:14;
    width:100%;
    border:1px solid #ccc;
}
ul#main-navigation li ul li {
    display:block;
    float:none;
    margin:0;
    z-index:15;
    width:100%;
    border-bottom:1px solid #ccc;
}
ul#main-navigation li ul li a {
    background:#eee;
    display:block;
    color:#333;
    z-index:16;
    zoom:100%;     
}
ul#main-navigation li ul li a:hover {
    background:#fff;
}
ul#main-navigation li:hover {
    background:#eee;
    border-left:1px solid #ccc;
    border-right:1px solid #ccc;
}
ul#main-navigation li:hover a.current {
    background:#eee; color:#000;
}
ul#main-navigation li:hover ul {
    display:block;
}
  • 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-05-24T17:20:28+00:00Added an answer on May 24, 2026 at 5:20 pm

    Just get rid of all the z-index values and it works fine:

    http://jsfiddle.net/bNBp3/12/

    Tested in Chrome and Firefox6.

    Edit: It seems I forgot to remove the z-index from ul#main-navigation li ul in the demo and that’s what makes it work, so just set it to any value 1 or higher.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have css that works on all tr tags for the table. so in
It is advisable to use tables in HTML pages (now that we have CSS)?
I have some CSS that doesn't behave correctly with IE8. It works fine with
I have a very simple demo working that uses Webkit transforms and transitions for
This is a database driven menu that IE6 likes fine but modern browsers not
On further investigation I have discovered that there is something in my CSS that
I have this script for my CSS Vertical Menu: //Nested Side Bar Menu (Mar
I have CSS that looks like this... .ColorSeparatorArea { background-color: #3d3d77; height: 1px; }
Hi have a small entry form that is jquery driven. It works fine on
I have CSS and HTML that I will be converting into PDF. I want

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.