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

The Archive Base Latest Questions

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

I have a simple drop down menu. When i add other elements under the

  • 0

I have a simple drop down menu.
When i add other elements under the menu (like text for exemple) they are still visible even if the drop down menu is oppened. The drop down menu is somehow merged with the content under it, resulting in ugly superimposed content.

Here is my css :

ul#menu, ul#menu ul{
    margin: 0px;
    padding: 0px;
}

ul#menu li{
    width: 160px;
    margin: 4px 0px 0px 4px;
    padding: 5px;
    list-style: none;
    position: relative;
    float: left;
    background: #eef;
    border: #bbf solid 1px;
}

ul#menu li ul li{
    width: auto;
    margin: 4px 0px 0px 0px;
    float:none;
    display: none;
    background: #ddf;
    border: #bbf solid 1px;
}

ul#menu li:hover ul li{
    display: block;
}

ul#menu li:hover{
    background: #ddf;
}

ul#menu li ul li:hover{
    background: #ccf;
}

ul#menu li img{
    margin-right: 10px;
}

Here is my html :

<ul id="menu">
    <li>
        <span><img src="images/logos/file_small.png"><a href="#">Bilan</a></span>
        <ul>
            <li id="creer"><img src="images/logos/add_small.png"><a href="#">Créer</a></li>
            <li id="consulter"><img src="images/logos/other_small.png"><a href="#">Consulter / Modifier</a></li>
        </ul>
    </li>
    <li>
        <span><img src="images/logos/chartbar_small.png"><a href="#">Extract</a></span>
        <ul>
            <li><img src="images/logos/pdf_small.png"><a href="#">Pdf</a></li>
            <li><img src="images/logos/xls_small.png"><a href="#">Excel</a></li>
        </ul>
    </li>
    <li>
        <span><img src="images/logos/first_small.png"><a href="#">Module Conso/Gene</a></span>
    </li>
</ul>

I hope you can help. 🙂

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

    http://jsfiddle.net/chrisvenus/GRfDT/2/ is a fiddle with your modifications and a solution.

    What I did was firstly altered the margin to make sure the text appeared in the right place (ie increasing the top margin).

    Then I modified the z-index on that text to put it behind the menu stuff. You could also have modified the z-index of the menus and it might even be best practice to put a z-index on both.

    <div style="position: absolute; margin-top: 50px; z-index: -1"> SOME CONTENT </div>
    

    z-index is basically designed for exactly this purpose – determining what order the content is in from background to foreground. For more information on it see http://www.w3.org/TR/CSS2/visuren.html#propdef-z-index

    Also I shoudl note that kinakuta, although replying before your problem was fully explained, is right about the fact that you should probably be making your menu absolute rather than the content that follows it. Mainly because I suspect it will mean neater HTML overall since it will stop you having to either have a container with all your other content or making far more things absolute than you want or worst case nto making everythign take it into account so some things get moved about or overlayed by your absoluted text in other ways…

    something like this: http://jsfiddle.net/chrisvenus/GRfDT/3/ (the same as before but with some swaps about where the position: absolute is)

    • 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 have created a simple drop down menu, with functions in it. And then
I'm trying to add delay to a simple drop down menu. With the following
I have a simple drop-down menu that is controlled using the following script: $(document).ready(function
Fiddle here: http://jsfiddle.net/emJcx/1/ I have a drop down menu that is a simple show
I have a working simple jquery drop-down menu . But problem is how can
Simple ASP.NET application. I have two drop-down controls. On the first-drop down I have
I have a drop down menu with 3 values. each has an option id.
I have a page with several multiselect drop-down menus. Each menu has a general
I'm using the jQuery Simple Drop-Down Menu Plugin from http://javascript-array.com/scripts/jquery_simple_drop_down_menu/ In their example, when

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.