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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:06:00+00:00 2026-05-28T20:06:00+00:00

I want to make a small website for myself and so I ask this

  • 0

I want to make a small website for myself and so I ask this question as a beginner. I cannot succeed to have the submenu contain another background when hovering the main menu.

HTML:

        <div id="nav">
            <ul class="sub1">
              <li><a href="#"><h2>Home</h2></a></li>
              <li><a href="#"><h2>About</h2></a><!---id="onlink"--->
                <ul class="sub2">
                  <li><a href="#" title="About Us">Us</a></li>
                  <li><a href="#" title="About Our product">Our product</a></li>
                </ul>
              </li>
            </ul>
        </div>

CSS:

#nav{
width:100%;
height: 60px;
padding-top: 20px;
padding-bottom: 10px;
}

#nav ul{
margin:0;
padding:0;
width: 60%;
margin: auto;

}

#nav ul li{
margin:0;
padding:0;
list-style: none;
float:left;
position:relative;
background:transparent url(EN/Button_menu_unselected.png);
}

#nav ul li ul li{
background:aqua; /*Test that doesn't work*/
}

#nav ul li a{
text-align:center;
text-decoration:none;
height:20px;
width:100px;
padding:10px;
display:block;
color:#003300;
}

#nav ul ul{
position:absolute;
visibility:hidden;
}

#nav ul li:hover ul{
visibility:visible;
}

#nav ul li:hover a{
background-image: url(EN/Button_menu_rollover.png);
}

The drop down items get the same format as the button called “Button_menu_rollover”, which gives me a very bad result.

  • 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-28T20:06:01+00:00Added an answer on May 28, 2026 at 8:06 pm

    The code:

    #nav ul li:hover a{
    background-image: url(EN/Button_menu_rollover.png);
    }
    

    is applied to all elements and sub-elements.

    This fixes it, but this code does not work on IE6:

    #nav ul li:hover > a{
    background: #fff;
    }
    

    Or you may use Javascript for HOVER effect to get exact results.

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

Sidebar

Related Questions

I have written a small PHP framework and I want to make a website
I have one small online sale business but I want to make it scalable
I am attempting to make a small website with a directory structure like this:
I have to make a small website where I have 7 type of users.
I am writing a small library and want to make it accessible using autotools
A researcher has created a small simulation in MATLAB and we want to make
I have style sheet with a class name changebackgroundcolor i want make change in
i sort of want to create a little backend of a small website. i
Sorry for the newbie question! I'm making a small website that allows users to
I am using jQuery to make a website, and I want to be able

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.