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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T16:49:44+00:00 2026-05-31T16:49:44+00:00

I was wondering on how to make a simple drop-down menu when my button

  • 0

I was wondering on how to make a simple drop-down menu when my button is hovered.

My button:

   <ul class="menu-links right" style="margin-left:-25px">
        <li class="menu-black"><a href="javascript:void(0)" class="dropHover">?</a></li>
    </ul>

Whenever the user hovers the “dropHover” I wish to have a new unordered list hover below. How is this possible?

Thanks.

  • 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-31T16:49:45+00:00Added an answer on May 31, 2026 at 4:49 pm

    You can make a simple dropdown/submenu with just plain css. The theory is that you hide your dropdown/submenu by adding display:none or pushing it far off the screen with a left position like left:-9999 and then when you hover over your menu item you reset that position or display property to show your menu, like so:

    This is the construct of a basic css menu.

    CSS

    .menu {
        width: 960px;
        background-color: Black;
        color: #fff;
        margin: 0 auto;
        height:auto;
        font-family: Segoe UI, Arial;
        font-weight:bold;
        min-height:15px;
    }
    .nav ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }
    .nav > li {
        float: left;
    }
    
    .nav li:hover a {
        background-color:#404040;
        color: #fff;
    }
    
    .nav a {
        background-color: Black;
        color: #fff;
        display: block;
        padding: 4px 12px;
        text-decoration: none;
        line-height:20px;
        font-size:12px;
        font-family: Segoe UI, Arial;
        white-space: pre;
    }
    
    .nav {
        zoom:1; /* ie hasLayout fix */
    }
    
    .nav li {
        position:relative;
    }
    
    .nav li ul {
        display:none;
        position:absolute;
        top:100%;
    }
    
    .nav li ul li:hover a {
        background-color:#777;
    }
    
    .nav li:hover ul {
        display:block;
    }
    
    /* Clearfix */
    
    .nav:before, .nav:after {
        display:table;
        content:"";
    }
    
    .nav:after {
        clear:both;
    }
    

    You can then add your dropdown/submenu as a child of your parent menu item.

    HTML

    <div class="menu">
        <ul class="nav">
            <li>
                <a href="#nowhere" title="Lorum ipsum dolor sit amet">Lorem</a>
                <ul>
                     <li><a href="#">SubItemOne looooooooooooooooooooooonger</a></li>
                    <li><a href="#">SubItemOne</a></li>
                    <li><a href="#">SubItemOne</a></li>
                    <li><a href="#">SubItemOne looooooooooong</a></li>
                </ul>
            </li>
            <li><a href="#nowhere" title="Aliquam tincidunt mauris eu risus">Aliquam</a></li>
            <li>
                <a href="#nowhere" title="Morbi in sem quis dui placerat ornare">Morbi</a>
                <ul>
                     <li><a href="#">SubItemOne looooooooooooooooooooooonger</a></li>
                    <li><a href="#">SubItemOne</a></li>
                    <li><a href="#">SubItemOne</a></li>
                    <li><a href="#">SubItemOne looooooooooong</a></li>
                </ul>
            </li>
            <li><a href="#nowhere" title="Praesent dapibus, neque id cursus faucibus">Praesent</a></li>
            <li><a href="#nowhere" title="Pellentesque fermentum dolor">Pellentesque</a></li>
        </ul>
    </div>
    

    Demo

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

Sidebar

Related Questions

I have a class containing, among other things, a drop down menu. With the
I was wondering which is the way to make this simple (and maybe stupid)
I'm wondering how to make a button or input field in Interface Builder react
I am attempting to make a simple class that serializes itself to disk when
I was wondering how I can make a simple bar chart that perhaps has
I'm just wondering if there's some methods which would make it simple to determine
I'm wondering how to make a release build that includes all necessary DLL files
I'm wondering how to make a window transparent, not cutout holes or the same
i was wondering how to make a time table from 1-12 with java sysout
Just wondering how I can make my app open automatically at login, but make

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.