Having difficulty choosing the third option in the dropdown menu

I'm facing an issue with the dropdown menu in my header file that I include on every page of my website. The dropdown list works fine up to the 2nd element, but then it becomes unclickable. I've checked the code for the dropdown list, and it seems to be working perfectly in this demo, but not on my actual webpage. Specifically, I can't select "Region3" or the 2nd child of "Region2" (Manage Region). Whenever I hover over the third element, it disappears from the screen.

Can you help me identify the problem?

    .parent {
        display: block;
        position: relative;
        float: right;
        line-height: 50px;
        background-color: #a9cc77;
        border-right: #CCC 1px solid;
    }
    
    .parent a {
        margin: 10px;
        color: #000;
        text-decoration: none;
        Font-weight:bold;
    }
    
    .parent:hover>ul {
        display: block;
        position: absolute;
	}
	
.parent:hover>.child {
	display: block;
	position: absolute;
	top: 100%;
	left: 0;
}

.child {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
}

.child li {
    background-color: #E4EFF7;
    line-height: 30px;
    border-bottom: #CCC 1px solid;
    border-right: #CCC 1px solid;
    width: 100%;
}

.child li a {
    color: #000000;
}

ul {
    list-style: none;
    margin: 0;
    padding: 0px;
    min-width: 10em;
    z-index: 999;
}

ul ul ul {
    left: 100%;
    top: 0;
    margin-left: 1px;
}

li:hover {
    background-color:#04ba0d;
}

.parent li:hover {
    background-color: #14871a;
}

.expand {
    font-size: 12px;
    float: right;
    margin-right: 5px;
}
    <div class="navbar navbar-inverse set-radius-zero" >
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<h1 class="coolShadow" STYLE="margin-left:145px;font-weight:BOLD;text-align:center;" >SYSTEM</h1>
</div>
<div class="right-div" style="padding:25px 0px 5px 0px;">
<a href="logout.php" class="btn btn-danger pull-right" style="margin-right:0px;">LOG ME OUT</a>
</div>
</div>
</div>
<!-- LOGO HEADER END-->
<section class="menu-section">
<div class="container">
<div class="row ">
<div class="col-md-12">
<div class="navbar-collapse collapse ">
<ul id="menu">
<li class="parent"><a href="change-password.php">Change Password</a></li>
<li class="parent"><a href="#">Configuration<i class="fa fa-angle-down"></i></a>
<ul class="child">
<li class="parent"><a href="#">Region1 <span class="expand">»</span></a>
<ul class="child">
<li><a href="add-region.php">Add Region</a></li>
<li><a href="manage-region.php">Manage Region</a></li>
</ul>
</li>
<li class="parent"><a href="#">Region2 <span class="expand">»</span></a>
<ul class="child">
<li><a href="add-region.php">Add Region</a></li>
<li><a href="manage-region.php">Manage Region</a></li>
</ul>
</li>
<li class="parent"><a href="#">Region3 <span class="expand">»</span></a>
<ul class="child">
<li><a href="add-region.php">Add Region</a></li>
<li><a href="manage-region.php">Manage Region</a></li>
</ul>
</li>
</ul>
</li>
<li class="parent"><a href="dashboard.php">Home</a></li>
</ul>

Answer №1

One issue I encountered was when importing a file into another webpage, the dropdown menu would not expand beyond its container. By setting the z-index property to a higher value, specifically z-index: 9999999, within the parent element, I was able to successfully resolve the problem.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Generate random images and text using a script that pulls content from an array

My goal is to have my website refresh with a random piece of text and image from an array when a button is clicked. I have successfully implemented the text generation part, but I am unsure how to incorporate images. Here is the current script for the text ...

What is the best way to create a fullscreen div without using an iframe?

My website features various div elements acting as separate windows. However, when I remove these divs, the content no longer fits the entire page. I attempted to use CSS to make it full-page without using iframes, just with a simple <p>Test</p& ...

Insert content into a designated DIV

Progress bars are essential for tracking certain metrics. Take a look at the progress bars below: <div id="lifeBar-holder"> <div id="lifeBar"></div> </div> <div id="discretionBar-holder"> <div id="discretionBar"&g ...

Issues with boxes showing or concealing depending on the chosen option

I am encountering an issue with a dynamic dropdown feature. The secondary box is supposed to appear based on the selection of the first box. However, as soon as I select an option in the second box, it disappears immediately. I suspect the problem lies wit ...

Evolving characteristics of Bootstrap popover

I am currently working on a text field and button setup where I have implemented a popover feature using Bootstrap. This is the code snippet I am using: function displayPopover() { $("#text").popover("show"); } The popover appear ...

When viewed on mobile browsers, the side-by-side divs in a tabbed layout appear to be

Looking for some help with responsive design for the "PORTFOLIO ATTRIBUTES" tab on my website. On desktop, the content displays fine, but on mobile it overlaps and cuts off. Here's the link to the page in question: . Any suggestions on how to maintai ...

Finding and implementing the page URL in JavaScript

Basically, I only want a certain script to be called if the URL is not "blogs.html". Here are some examples where the script should NOT be called: mydomains.com/blogs mydomains.com/blogs.html And here are some examples where the script should be called: ...

Difficulty with Horizontal Mousewheel Scrolling

Struggling to implement a horizontal scrolling feature (via mousewheel) for both containers in the code below. I want this feature to be easily applied to any future container creations as well. <body> <style> #container { display: flex ...

Automatic responsive navigation bar in mobile view

As a novice in web programming, I'm facing an issue where the navigation bar shifts to the bottom when the mobile screen size changes. Many solutions online use the hamburger style, which I find less appealing. Here is how the mobile view looks befor ...

Span element not found using xpath

Recently updated the outer html and encountered a new error. It appears that the element was identified but failed to be clicked on. My script fails at the element below. I have attempted various methods to reconstruct the xpath, but the robot continues t ...

custard stealth style of jquery's mobile CSS

Is there a way to switch the jquery mobile CSS to a desktop-friendly CSS when a user is not on a mobile device? I am looking for a platform or existing CSS that can accomplish this. ...

What is the reason for the discrepancy in actual size of <input type="text"> compared to the specified size

Let's analyze the following code snippet: <div style="width: 10em; float: left; padding: 0; margin: 0"> <input type="text" style="width: 10em"/> </div> The text field in this code does not fill up the entire parent DIV as one mig ...

Text does not wrap correctly when placed between elements with the property white-space: nowrap

When applying the white-space: nowrap property to all children of an element, an issue arises in Webkit (and blink) where white space doesn't break between elements as expected: View example on jsFiddle .pairs { width: 180px; overflow: hidde ...

What is the process for determining the overall cost of a column in Angular 9?

I am facing a challenge in calculating the total price, total quantity, and total counted(#) of each column in a table. | Item | Price | Quantity | 1 | Mouse | 500 | 1 | 2 | Wire | 100 | 2 | TI:3 | |TP:600 | TQ:3 | < ...

The getelementbyid function is unable to locate the specified button identifier

As I dive into the world of Javascript, I wanted to create a simple input form with a corresponding response field on my website. However, I encountered an issue where using a basic submit button caused the page to refresh and erase the textfields before ...

Delaying Jquery on scroll Event

Hey there, I've got a set of icons that I'd like to reveal one by one as you scroll down. I've incorporated some animations from , but now I'm wondering how I can implement a delay function in my jQuery so the icons appear sequentially ...

switching tabs on a webpage

My PHP page has a menu tab with tabs labeled as Dash and Project. The Dash tab contains a table displaying data. The scenario is that when I click on a row in the table within the Dash tab, it should navigate to the Project tab, where a simple form is disp ...

Display information based on the radio button chosen

I've set up a radio button with options for "no" and "yes", but neither is selected by default. Here's what I'm trying to achieve: If someone selects "no", nothing should happen. However, if they select "yes", then a message saying "hello w ...

Having trouble making alerts or confirmation dialogs function in JavaScript

EDIT: Many thanks to everyone who helped fix this issue (: Your help is greatly appreciated! I've been struggling to get the alert, confirm, or prompt functions to work properly in my code. Here's a snippet of the code that's causing troubl ...

CSS: the max-width property does not constrain an absolute positioned container from overflowing

I've been trying to figure this out for hours, but I can't seem to get it right. My top menu has submenus that include a popup menu. In one of my popups, I need the container to have a maximum width of 170 pixels and all the items inside to wra ...