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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T21:02:01+00:00 2026-05-15T21:02:01+00:00

I am trying to make drop down menu. Some folks helped me on CSS

  • 0

I am trying to make drop down menu. Some folks helped me on
CSS only drop down menu post.

Everything works fine except when I hover my mouse to my submenu. The hover state background image in my #menubar #test2 a:hover will return to #menubar #test2 a state. I really need to get this done and would appreciate if anyone could help me about it. Thanks a million.

My html

<ul id="menuBar">
   <li id="test1">test1</li>
   <li id="test2"><a href="#">Pro1</a>
     <div class="subMenu">
        <ul>
           <li><a href="#">sub1</a></li>  
           <li><a href="#">sub2</a></li>
           <li><a href="#">sub3</a></li>
         </ul>
         <ul>
            <li><a href="#">Volleyball</a></li>
            <li><a href="#">Walking</a></li>
            <li><a href="#">Water Shoes</a></li>
         </ul>
       </div> <!--end of submenu-->
     </li>
  </ul>

CSS

#menuBar #test2 a{
background:url("../images/btTest.jpg") no-repeat bottom;
display:block;
border-right:1px solid #ffffff;
width:112px;
height:37px;
}

#menuBar #test2 a:hover{
background:url("../images/btTest.jpg") no-repeat top;
}  

#menuBar #test2 a:hover + .subMenu { //submenu show up
display:block;

} 

#menuBar li .subMenu:hover {  //keep submenu show up when hover in submenu
display: block; 
}

//the next one is not working....but I can't think of anything....
#menuBar li .subMenu:hover #menuBar #mens a {  
background:url("../images/btMen.jpg") no-repeat top;
}
  • 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-15T21:02:02+00:00Added an answer on May 15, 2026 at 9:02 pm

    You need this:

    #menuBar #test2 a:hover{
       background:url("../images/btTest.jpg") no-repeat top;
    } 
    

    To be this:

    #menuBar #test2:hover a {
      background:url("../images/btTest.jpg") no-repeat top;
    }
    

    To get it to stick when you move to the .subMenu. This will not work for IE6 (if you care).

    Also these:

    #menuBar #test2 a:hover + .subMenu { //submenu show up
      display:block;
    } 
    
    #menuBar li .subMenu:hover {  //keep submenu show up when hover in submenu
      display: block; 
    }
    

    Should be able to be replaced with just this:

    #menuBar li:hover .subMenu {
      display: block;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to make a drop-down menu, works fine in firefox It does not
I am trying to make CSS drop down menu (no javascript involved). According to
I'm trying to make a simple CSS drop down menu that when you mouse
I'm trying to make a drop down menu using javascript/jquery but can't get my
I'm trying to find/make a good jquery drop-down menu with animation (fadein/fadeout or slidedown)
I'm trying to make a basic drop down menu with animate and am running
I am trying to make a drop down menu of links. I use the
I'm trying to make a CSS & JS based dropdown-menu. This example works in
I'm trying to make a simple menu bar only application on xcode 4. Everything
im trying to make an easy drop down menu plugin for jquery but for

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.