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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T17:37:20+00:00 2026-06-10T17:37:20+00:00

I have created a navigation menu which uses javascript. I have drop down menus

  • 0

I have created a navigation menu which uses javascript. I have drop down menus in parts of the main menu but when I click on the arrow it only displays the drop down up to the end of the div (see image):

enter image description here

How can I get it so that the drop down appears on top. I have tried overflow: visible but this doesnt seem to work.

HTML:

<div id="top_bar">
<div id="top_inner">
<div id="logo"> <a href="http://www.edosbornephotography.com"><img src="images/logo.gif" alt="Ed Osborne" width="220" height="100" class="logo"></a></div>
<div class="nav">
<ul class = "menu" >
            <li> <a href = "#" > Home </a> </li>
            <li><a href = "#" > Tutorials </a>
        <ul class = "submenu" >
            <li> <a href = "#" > CSS </a> </li>
            <li> <a href = "#"> Javascript </a> </li>
            <li> <a href = "#" > jQuery </a> </li>
            <li> <a href = "#"> HTML </a> </li>
            <li> <a href = "#" > PHP </a> </li>
        </ul>
        </li>

CSS:

.nav {
margin: 0 auto;
position: relative;
padding-top: 85px;
}

ul.menu {
list-style: none;
padding: 0 22px;
margin: 0;
float: left;
background: #222;
font-size: 1.2em;
background: url(../images/topnav_bg.gif) repeat-x;
}

ul.menu li {
float: left;
margin: 0;  
padding: 0 15px 0 0;
position: relative; 
}

ul.menu li ul.submenu {
list-style: none;
position: absolute; 
left: 0; top: 35px;
background: #333;
margin: 0; padding: 0;
display: none;
float: left;
width: 170px;
-moz-border-radius-bottomleft: 5px;
-moz-border-radius-bottomright: 5px;
-webkit-border-bottom-left-radius: 5px;
-webkit-border-bottom-right-radius: 5px;
border: 1px solid #111;
}

ul.menu li ul.submenu li{
margin: 0; padding: 0;
border-top: 1px solid #252525; 
border-bottom: 1px solid #444; 
clear: both;
width: 170px;
}

html ul.menu li ul.submenu li a {
float: left;
width: 145px;
background: #333 url(../images/dropdown_linkbg.gif) no-repeat 10px center;
padding-left: 20px;
}
  • 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-10T17:37:21+00:00Added an answer on June 10, 2026 at 5:37 pm

    You need to use Z-index in the submenu tag

    ul.menu li ul.submenu {
    z-index: 5000; // <-- ADD THIS
    list-style: none;
    position: absolute; 
    left: 0; top: 35px;
    background: #333;
    margin: 0; padding: 0;
    display: none;
    float: left;
    width: 170px;
    -moz-border-radius-bottomleft: 5px;
    -moz-border-radius-bottomright: 5px;
    -webkit-border-bottom-left-radius: 5px;
    -webkit-border-bottom-right-radius: 5px;
    border: 1px solid #111;
    }
    

    —- EDIT based on your comment below—-

    Wait – I think we are misunderstating you based on your comment- you want the submenu moved UP so it’s above the existing menu? (as opposed to above the content on the page?) If so you need to do a negative margin-top on the submenu like this:

    ul.submenu {
        margin-top:-2em; // adjust me (use 'em' to scale w/ font size adjustments)
    }
    

    you need “position: absolute; ” for this to work but you already have it on this class in your CSS

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

Sidebar

Related Questions

I have created an HTML page which uses simple CSS (no javascript) for menu
Taxonomy Menu created two menus, which have not gone even after I disabled it.
I have created a navigation menu where, when clicking on a link, a jquery
I am having trouble with a navigation menu I have created. Basically, the navigation
I'm using the navigation controller project. I'd like to have a main menu without
I have created navigation menu in YUI 2.8 as below : I have also
I have two activities with navigation menu which has items for launching Activity1 and
I have created a wordpress site. The home page appears in the navigation menu
https://i.stack.imgur.com/OP0kc.jpg the navigation menu i have created using the CSS and Html code is
I have a navigation menu that has submenus slide down on hover. The menu

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.