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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T10:00:51+00:00 2026-05-30T10:00:51+00:00

I have got a submenu which expands from a nav menu type object when

  • 0

I have got a submenu which expands from a nav menu type object when I hover over it. Right now, my main nav menu looks like so…

<div id= "navbar">
    <ul>
        <li><a href= "#" class= "navlink" id= "first"> First
              <div class= "firstsubmenu">
                    <ul>
                         <li> <a href= "#" class="firstsubmenulink"> First sub menu option </li>
                         <li> <a href= "#" class="firstsubmenulink"> Second sub menu option </li>
                         etc...
                    </ul>
              </div></a></li>
         <li><a href= "#" class= "navlink" id="second"> Second
             <div class= "secondsubmenu">
                <ul>
                    ..and so on 
    </ul>
</div>

Right now, my css is looking like

ul
{
list-style-type:none;
margin:0;
padding:0;
overflow:hidden;
}

li
{
float:left;
}

.navlink:link
{
display:block;
width:120px;
text-align:center;
padding:10px;
text-decoration:none;
color:#FFFFFF;
}

.navlink:hover 
{
background-color:#ADD8E6;
color:#FFFFFF;
}
.navlink:visited 
{
background-color:#ADD8E6;
color:#FFFFFF;
}

Before I tried making each item in the submenu a clickable link, everything showed up perfectly fine. IE: firstsubmenu showed up perfectly. It’s css is

.firstsubmenu
{
display : none;
position : absolute;
left : 75px;
top : 32px ;
background-color : red; 
width : 930px;
height : 25px;
z-index : 10;
}

But now that I added the links (made every list element within an block), firstsubmenu no longer appears.
The css for each link looked something like this

.firstsubmenulink
{
display:block;
width:120px;
text-align:center;
padding:10px;
text-decoration:none;
color:#FFFFFF;
}

But as I said, the submenu no longer even appears. I realize this is a bit of a long post, but any advice would be great.

  • 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-30T10:00:52+00:00Added an answer on May 30, 2026 at 10:00 am

    jsBin live demo

    I had to fix lot of errors in your HTML. Here is the css:

    #navbar ul{
      list-style:none;
      margin:0; padding:0;
      display:table;
    }
    #navbar li{
      top:0px;
      background:#bbf;
      display:inline-block;
        width:100px;
    }
    #navbar li ul li{
      display:none;
    }
      #navbar li:hover li{
        display:block;
      }
    

    And the fixed HTML:

      <div id="navbar">
        <ul>
            <li>
                 <a href="#" class="navlink" id="first"> First</a>
                 <ul class="firstsubmenu">
                      <li><a href="#">1. option</a></li>
                      <li><a href="#">2. option</a></li>         
                 </ul>
            </li>
            <li>
                 <a href= "#" class= "navlink" id="second"> Second</a>
                 <ul class="secondsubmenu">
                      <li><a href="#">1. option</a></li>
                      <li><a href="#">2. option</a></li> 
                 </ul>
            </li>
        </ul>
    </div>
    

    Now, after it works, do with colors whatever you want.
    Use also alt tags in your links and images, it improves your SEO and compilance.

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

Sidebar

Related Questions

We have got a custom MembershipProvider in ASP.NET . Now there are 2 possible
We have got loads of options for php + MySQL + Apache combo... Which
I have got a python script which is creating an ODBC connection. The ODBC
I have got some code to load an assembly and get all types, which
I have got the following code from here to read an Excel file using
I have got a class which is called BaseCore which just runs all the
I have got script which generates some graphic and returns it as a result,
I have got date field in my foos table. So now I need to
I have got the list of Class Name as Follows: Type[] typelist = typeof(Sample.Students).Assembly.GetTypes();
I have got a text field, and then I type some text onto it.

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.