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 8188795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T03:02:30+00:00 2026-06-07T03:02:30+00:00

I have designed a 2-Level CSS drop down menu. Everything works perfect except only

  • 0

I have designed a 2-Level CSS drop down menu. Everything works perfect except only one thing. I want it so that when I hover over the top menu item, the 1st level drop down menu appears and when I hover over the item Press in the 1st level menu then the 2nd level menu items appear. But the problem is that when I hover over the top menu all sub-menus appear altogether. That means the display: none does not work. Why does it happen and what is the solution?

jsfiddle.net

HTML Code

<ul id="nav">
 <li><a href="/ueber_uns.htm">About Us</a>
  <ul>
    <li><a href="#">Who We Are</a></li>
    <li><a href="#">Our Goals</a></li>
    <li><a href="#">Our Team</a></li>
    <li><a href="#">Press</a>
     <ul>
      <li><a href="#">2006</a></li>
      <li><a href="#">2007</a></li>
      <li><a href="#">2008</a></li>
     </ul>
    </li>
   <li><a href="#">Impressum</a></li>
  </ul>
 </li>
</ul>

CSS Code

ul#nav 
{
margin: 0;
padding: 0;
list-style: none;
text-align: center;
/*display: table-cell;
vertical-align: middle;*/
}
ul#nav li
{
float: left;
position: relative;
font-size: 16px;
background-color: orange;
}
ul#nav li li
{
font-size: 14px;
}
ul#nav ul 
{
margin: 0;
padding: 0;
list-style: none;
text-align: left;
display: none;
}
ul#nav li:hover ul 
{
display: block;
position: absolute;
}
ul#nav a:link, ul#nav a:visited
{
display: block;
width: 110px;
padding: 10px 5px;
text-decoration: none;
color: #000;
}
ul#nav ul a:link, ul#nav ul a:visited 
{
width: 135px;
}
ul#nav a:hover, ul#nav a:active
{
color: #fff;
}
ul#nav ul ul
{
position: absolute;
top: 0;
left: 100%;
display: none;
}
ul#nav ul 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-06-07T03:02:33+00:00Added an answer on June 7, 2026 at 3:02 am

    Change this

    ul#nav li:hover ul 
    {
    display: block;
    position: absolute;
    } 
    

    to this

    ul#nav li:hover > ul 
    {
    display: block;
    position: absolute;
    }
    

    Example

    Basically what ul#nav li:hover > ul does is that it targets the secondary drop-down menu only, so when you hover over about us, only the second level menu is going to show up, leaving the third one hidden.

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

Sidebar

Related Questions

I have designed a site and my CSS is not loading in FF and
I have designed a menu that consists of a few buttons in several different
I have designed a page in Fireworks then imported it to Dreamweaver in CSS
I have designed a new web site. I have hosted it online. I want
I have designed one sign-up form,in this form after getting all necessary values I
I have designed a long web page and there are many photos in one
I have a PackageMaker .pmdoc designed in the PackageMaker GUI. The top level package
I have a designer working at the ASPX level. He doesn't do C#, doesn't
I have designed a tabbed page. I'm able to load forms in the tabs
I have designed this gui in netBeans which has a canvas , a couple

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.