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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T12:07:15+00:00 2026-06-12T12:07:15+00:00

I have a z-index issue on top-navigation with a menu and its sub-menu, i

  • 0

I have a z-index issue on top-navigation with a menu and its sub-menu, i want menu to overlap sub-menu, i have set z-index of menu higher than sub-menu, but it is not working sub-menu is overlapping menu as default.

Please see and suggest any possible way to do it.

jsFiddle

HTML

<div id="login">
<ul>
<li id="overlap"><a href="#">Log In | Join</a>
    <ul class="tsm">
    <li><a href="#">Log In</a></li>
    <li><a href="#">Join</a></li>
    </ul>
</li>
</ul>
</div>

CSS

    #login {
    margin: 0px auto;
    width: 1000px;
    height: 38px;
    background: #343438;
}
#login ul {
    float: right;
    margin: 0px;
    padding: 0px;
    width: auto;
    height: 38px;
}
#login ul li {
    float: left;
    width: auto;
    height: 34px;
    display: inline;
    list-style-type: none;
}
#login ul a {
    color: #FFF;
    display: block;
    width: auto;
    height: 34px;
    font: bold 16px/34px "Arial Narrow", Arial, sans-serif;
    text-decoration: none;
    text-align: center;
    padding: 0px 15px;
    text-shadow: 0px -1px #000;
}
#login .tsm {
    padding: 20px;
    background-color: #F2F2F4;
    width: 230px;
    height: auto;
    text-align: left;
    border: 4px solid #777;
    position: absolute;
    visibility: hidden;
    top: 32px;
    right: 0px;
    z-index: 100;
}
#login .tsm li a {
    width: 230px;
    height: 30px;
    margin-bottom: 1px;
    text-align: left;
    padding: 0px;
    text-decoration: none;
    color: #000;
    text-shadow: 0px 1px #fff;
    font: 15px/30px Arial, sans-serif;
    border-bottom: 1px solid #DDDDDF;
}
#login ul #overlap {
    position: relative;
    border: 2px solid #900;
    z-index: 1000;
}
#login ul li:hover .tsm {
    visibility: visible;
}
#login ul ul li {
    border: none;
}
  • 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-12T12:07:17+00:00Added an answer on June 12, 2026 at 12:07 pm

    The problem stems from the fact that you’re trying to position the parent above its child, which causes problems – if the parent moves up a level, so do its children. Instead of z-indexing the parent list, you need to z-index the login link (a tag):

    http://jsfiddle.net/SaNJA/

    The code is rough, but it should get you started.

    Make sure you add a background colour to the link, otherwise you’ll still be able to see through it.

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

Sidebar

Related Questions

I have an odd issue here :http://alarmefast.com/securitasdirect2011/index.php On the top left corner, I have
I have a menu element on the top of the page with position:fixed; z-index:1000;
I have an issue in IE6 but not IE>=7, FF or Chrome. It is
I have a web page with a CSS dropdown navigation menu. My issue is
Here's my issue: I have a modified spasticNav jQuery script for a navigation menu
I have an issue where I want to display a header in the top
I have an index view that I want to update automatically as the user
Here is the issue: I have a page index.php and onclick of select element
Possible Duplicate: Css z-index problem I have an issue where one image is infront
I have an issue when attempting to set the background of a grid in

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.