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

  • Home
  • SEARCH
  • 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 7778719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T18:28:06+00:00 2026-06-01T18:28:06+00:00

I am trying to implement a pure CSS menu on hover. Everything works except

  • 0

I am trying to implement a pure CSS menu on hover. Everything works except that when hide the menu and try to show it on hover…it doesnt happen.

Here is my HTML:

         <ul id="nav-menu">
            <li><a href="#" class="first" id="p-menu">A</a></li>
                <ul class="submenu">
                    <li><a href="#">1</a></li>
                    <li><a href="#">2</a></li>
                    <li><a href="#">3</a></li>
                    <li><a href="#">4</a></li>
                </ul>
            <li><a href="#">B</a></li>
            <li><a href="#">C</a></li>
            <li><a href="#">D</a></li>
            <li><a href="#">E</a></li>
            <li><a href="#">F</a></li>
            <li><a href="#">G</a></li>
            <li><a href="#" class="last">H</a></li>
        </ul>

And My CSS:

  #nav-menu {
   position: relative;
     }

       #header .submenu {
        width: 158px;
            height: 133px;
background: url(../images/submenu-bg.png) no-repeat;
position: absolute;
top: 49px; left: -11px;
display: none;

}

            #header .submenu li a {
display: block;
margin: 10px 66px 5px 20px;
border: 0 none;

}

        #header .submenu li a:hover {
display: block;
margin: 10px 66px 3px 20px;
border: 0 none;

}

           #nav-menu #p-menu:hover ul.submenu {
display: block!important;

}

Any help would be highly appreciated.

  • 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-01T18:28:07+00:00Added an answer on June 1, 2026 at 6:28 pm

    Your sub menu ul should be nested within your li, not after it. Otherwise this is invalid HTML. Also you should put your p-menu id on the li instead of the a.

    Change:

    <li><a href="#" class="first" id="p-menu">A</a></li>
    <ul class="submenu">
       <li><a href="#">1</a></li>
       <li><a href="#">2</a></li>
       <li><a href="#">3</a></li>
       <li><a href="#">4</a></li>
    </ul>
    

    To:

    <li id="p-menu"><a href="#" class="first">A</a>
       <ul class="submenu">
          <li><a href="#">1</a></li>
          <li><a href="#">2</a></li>
          <li><a href="#">3</a></li>
          <li><a href="#">4</a></li>
       </ul>
    </li>
    

    — SEE EXAMPLE —

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

Sidebar

Related Questions

Trying to implement simple error handling without adding buku try / except statements to
when trying to implement an Aspect, that is responsible for catching and logging a
I'm trying to implement a rather large object that implements many interfaces. Some of
I'm trying to implement another pure javascript memcache client for node.js. The question is
I am currently trying implement a QThread that contains a socket connection. The socket
Trying to implement a function in my linkedlist class that will return total amount
I'm struggling with some Generic constraint issues when trying to implement a library that
So I'm essentially trying to implement an AIR Native Extension that does the physics
I'm trying to define a base a class in C++ that has pure virtual
Trying to implement a rating system of users and postings. What is the best

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.