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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:18:06+00:00 2026-06-09T23:18:06+00:00

Whenever I hover on the menu item, it turns on the hover background +

  • 0

Whenever I hover on the menu item, it turns on the hover background + opens up drop down menu.
but whenever I hover the dropdown, the background goes off?

examples and how should it look like this

see Live preview

Also as you see the box shadow goes over it.

Codes:
My menu html:

       <div class="secondheader">

      <div class="container">

               <div class="span12">

                          <ul class="nav6">

                          <li><a href="#">Home</a></li>

                           <li class="dropdown1"><a href="#">Categories</a>
                <ul>
                    <li class="substyle"><a href="#">Buy</a></li>
                    <li class="substyle"><a href="#">Sell</a></li>
                    <li class="substyle"><a href="#">Forums</a></li>
                    <li class="substyle"><a href="#">Contact</a></li>
                    <li class="substyle"><a href="#">item 1</a></li>
                    <li class="substyle"><a href="#">Forums</a></li>
                    <li class="substyle"><a href="#">Contact</a></li>
                    <li class="substyle"><a href="#">item 1</a></li>
                </ul>
            </li>

                          <li><a href="#">Buy</a></li>

                          <li><a href="#">Sell</a></li>

                          <li><a href="#">Forums</a></li>

                          <li><a href="#">Contact</a></li>

                          <li><a href="#">item 1</a></li>

                          <li><a href="#">Forums</a></li>

                          <li><a href="#">Contact</a></li>

                          <li><a href="#">item 1</a></li>

                          </ul>

                          </div>

               </div>

       </div>

</div>    

My css of menus:

.nav6  {
list-style: none;
font-family: 'Dosis', sans-serif;
float: left
font-size: 20px;
margin-top: 13px;
margin-left: -35px;
}
.nav6>li>ul{
display:none;
position:absolute;
background:white;
overflow:hidden;
width: 150px;
background: #fbf2d3;
margin-top: 20px;
margin-left: -3px;
-webkit-box-shadow:  0px 1px 5px 0px #dadada;
box-shadow:  0px 1px 5px 0px #dadada;       
}
.nav6>li:hover>ul {
display:block;
}
.nav6 >li {
display: inline;
margin: 0px;
font-size: 18px;
font-family: 'Dosis', sans-serif;
float: left;
margin-top: 10px;
}
.substyle {
padding: 10px;
}
.substyle:hover {
background: #f54922;
padding: 10px;
-webkit-border-radius: 6px;
border-radius: 6px;
color: #fff;
}
.subsyle a:hover {
color: #fff;
}
.nav6>li>a {
padding-top: 20px;

padding-bottom: 20px;

padding-left: 20px;

padding-right: 20px;

}
.nav6 a{color: #7D7253;}

.nav6 a:hover {
color: #fff;

text-decoration: none;
}
.nav6 > li > a:hover {
background-image: url("../img/hoverbg.png");    
}    

Question: What does > selectors do exactly? could you please explain me that with an easy example? thank you very much!

  • 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-09T23:18:07+00:00Added an answer on June 9, 2026 at 11:18 pm

    You need to add a class that shows the hover image when you’re hovered on the whole li, not just the child li. Try changing your last style to this:

    .nav6 > li > a:hover, .nav6 > li:hover > a {
        background-image: url("../img/hoverbg.png");    
    }    
    

    Also, the > selector is saying specifically a “direct child” of the parent. So if you have this:

    <div>
        <p><span></span></p>
        <span></span>
    </div>
    

    Then this will apply to all the spans:

    div span {}
    

    This will apply to only the second span:

    div > span {}
    

    Either of these will apply to only the first span:

    div p span {}
    div > p > span {}
    

    In the last case, you wouldn’t use the > – only use it if you specifically need to target only the direct child.

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

Sidebar

Related Questions

Stack, I'm having difficulty creating a good drop down navigation menu using only css.
I have this dropdown menu, that will slideDown whenever my users click on a
currently i have a hover box appearing whenever i mouse over TITLE, FORMAT. html
this script fadeIn fadeout many time whenever user hover on it or it's fade
I have a jQuery that, whenever the document is ready, binds a hover event
I'm working on resolving this hover issue on my site. Whenever I roll over
I have a simple dropdown menu, and to stop the build up of the
I'm having a problem in IE9: Whenever i hover over my top level wrapper
I would like to add custom tooltips to emacs. More specifically, whenever I hover
how would i got about doing something when hovering over a list item, but

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.