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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:41:08+00:00 2026-06-02T02:41:08+00:00

I have created a drop down menu in css. The drop down menu is

  • 0

I have created a drop down menu in css.

The drop down menu is rendered correctly in Firefox, Chrome and IE8. But in IE8 I am not able to make the selection from the drop down. it immediately vanishes..

css file …

ul {
/*  font-family: Arial, Verdana;
  font-size: 14px;*/
  margin: 0;
  padding: 0;
  list-style: none;
 }
ul li {
  display: block;
  position: relative;
  float: left;
}
li ul { display: none; }
ul li a {
  display: block;
  text-decoration: none;
  color: #ffffff;
  border-top: 1px solid #ffffff;
  padding: 5px 15px 5px 15px;
  background: #2C5463;
  margin-left: 1px;
  white-space: nowrap;
}
ul li a:hover { background: #617F8A; }
li:hover ul {
  display: block;
  position: absolute;
  left:none;
}
li:hover li {
  float: none;
  font-size: 11px;
}
li:hover a { background: #617F8A; }
li:hover li a:hover { background: #95A9B1; }

~

HTML (php file here..)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-gb" lang="en-gb" >
<HEAD>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<TITLE></TITLE>
<link rel="stylesheet" href="menu.css" type="text/css">
</HEAD>
<BODY>
<div id="header" class="top-bottom">
<ul id="menu">
  <li><a href="">Home</a></li>
  <li><a href="">Profile</a>
    <ul>
    <li><a href="./edit_profile.php">Edit Profile</a></li>
    <li><a href="">View Profile</a></li>
    <li><a href="">Add Education</a></li>
    </ul>
  </li>
  <li><a href="">My Connections</a></li>
  <li><a href="">Change Password</a></li>
</ul>
</div>
  • 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-02T02:41:10+00:00Added an answer on June 2, 2026 at 2:41 am

    A lot of your styles were being inherited by your submenu so you have to add a more specific selector in order to target your first level and sub menu properly. Also, you were positioning absolutely your submenu on hover, that should be set on the main declaration and not on a state. Here is a fixed version:

    CSS

    ul {
    /*  font-family: Arial, Verdana;
      font-size: 14px;*/
      margin: 0;
      padding: 0;
      list-style: none;
     }
    #menu > li { /* used the child selector here to properly target your first level menu items */
      position: relative;
      float: left;
    }
    #menu li ul {
        display: none;
        position: absolute; /* moved the positioning to the main declaration instead */
        left:0; /* fixed this propery, there is no left:none as you had it before */
        top:100%;
    }
    
    #menu a {
      display: block;
      text-decoration: none;
      color: #ffffff;
      border-top: 1px solid #ffffff;
      padding: 5px 15px 5px 15px;
      background: #2C5463;
      margin-left: 1px;
      white-space: nowrap;
    }
    #menu li a:hover { background: #617F8A; }
    
    #menu li:hover ul {
      display: block;
    }
    
    #menu li:hover li {
      font-size: 11px;
    }
    #menu li:hover a { background: #617F8A; }
    #menu li:hover li a:hover { background: #95A9B1; }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created drop down menu, but it is not showing in home page
I have created a drop down menu using JQuery but when I test it
I have created a drop down menu with animals. But what I wanna do
I have created a CSS dropdown menu, but when it drops down, it is
I created a drop down nav menu purely in css and everything works correctly
I have a drop down menu created purely with CSS. I would like to
I have created a simple drop down menu, with functions in it. And then
I have created a drop-down-menu, the html for the drop-down part basically looks like
I have created a dropdown menu with jquery: here Everything is ok but in
I have created a drop down with jQuery that can be seen here by

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.