Z-index malfunctioning - need to troubleshoot

Check out my website at

Upon visiting the website on a PC, you'll notice that the navigation menu appears on the loader. Can anyone explain why this is happening?

The only modifications I made to my CSS are:

<style>
.navbar-inverse {
   background-color: #3A1F3B;
   border-color: #222222;
}

.navbar {
   margin-bottom: 0px;
}
</style>

I simply added a class to call it->

<nav class="MY_OLD_CLASSES + nav nav_inverse">

I haven't made any other changes, and I would appreciate any assistance in resolving this issue.

Your help will be highly appreciated. Thank you!

EDIT

Here is my full code:

<style>
.navbar-inverse {
  background-color: #3A1F3B;
  border-color: #222222;
}

.navbar {}
</style>
    <div class="navbar navbar-inverse nav-bar-main" role="navigation">
        <div class="container">
            <nav class="main-navigation clearfix visible-md visible-lg" role="navigation">
                    <ul class="main-menu sf-menu">

                       <?php 
                                            foreach ($main as $lvl1){
                                                if(strpos($lvl1->href, 'http') !== false){ $lvl1_link = $lvl1->href;} else {$lvl1_link = link_url().$lvl1->href;}                                                   
                                                echo '<li><a href="'.$lvl1_link.'">'.$lvl1->title.'</a>';

                                                If ($lvl1->dropdown == "1"){
                                                    echo '<ul class="sub-menu" style="width:300px;">';                                                      
                                                    foreach ($sub as $lvl2){
                                                        If ($lvl2->mid == $lvl1->id){
                                                            If ($lvl2->dropdown == "1"){

                                                                if(strpos($lvl2->href, 'http') !== false){$lvl2_link = $lvl2->href;} else {$lvl2_link = link_url().$lvl2->href;}                                                                    
                                                                echo '<li><a href="'.$lvl2_link.'">'.$lvl2->title.'</a><ul class="sub-menu">';
                                                                foreach($subsub as $lvl3){
                                                                    If ($lvl3->mid == $lvl2->id){

                                                                        if(strpos($lvl3->href, 'http') !== false){$lvl3_link = $lvl3->href;} else {$lvl3_link = link_url().$lvl3->href;}                                                                            
                                                                        echo '<li><a href="'.$lvl3_link.'">'.$lvl3->title.'</a></li>';
                                                                    }
                                                                }
                                                                echo '</ul></li>';
                                                                }else{
                                                                if(strpos($lvl2->href, 'http') !== false){$lvl2_link = $lvl2->href;} else {$lvl2_link = link_url().$lvl2->href;}
                                                                echo '<li><a href="'.$lvl2_link.'">'.$lvl2->title.'</a></li>';
                                                            }
                                                        }
                                                    }
                                                    echo '</ul>';
                                                }
                                                echo '</li>';
                                            }
                                        ?>

                    </ul> <!-- /.main-menu -->

            </nav> <!-- /.main-navigation -->
        </div> <!-- /.container -->
    </div> <!-- /.nav-bar-main -->

EDIT 2

If I remove the navbar and navbar-inverse classes, the issue goes away, but I want to maintain the current UI so I cannot remove them.

Answer №1

To implement the addition of the loaded class to the body, you can follow this code snippet:

body:not(.loaded) .navbar {
  display: none;
}

Answer №2

I finally discovered the answer! (Apologies for not noticing it sooner :( )

It turns out that my JQuery navbar and navbar-inverse classes were already being used elsewhere, so I decided to utilize the style="" attribute instead.

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

I'm interested in implementing a cooldown feature on my button, but I'm not quite sure how to go about

Working on a React.Js website and looking to improve the Contact Me page by adding a cooldown to the button. Unfortunately, I haven't shared all the code here but feel free to reach out on Discord: uvejs#5162 for more details. import "./contactpa ...

Issues with clicking on the ion-tab icon in AngularJS are hindering the functionality

I'm currently facing a challenge with an ion-tab icon in my AngularJS project. I've been attempting to add a click action using the code below, but unfortunately, nothing is displaying as expected. HTML <ion-tab title="Share" icon="icon ion- ...

Unable to retrieve the following element in a JavaScript array

I am a beginner in JavaScript and I am attempting to access the next element of an array using an onclick function but so far I have not been successful. var i, len; function quiz() { var quiz_questions = [ "who is the founder of Fa ...

Leveraging the Bootstrap 3 audio player, although displaying a standard HTML5 output

When trying to use the Bootstrap 3 player to display an audio player, I'm encountering an issue where the page only shows a default black HTML5 audio player output. Here is my current directory structure: miuse/ application/ bootstrap/ ...

The presence of the StickyHeader Row is causing an obstruction in the drop down list view

I have successfully made the row header of the Material UI Table component sticky by utilizing the stickyHeader attribute. <Table stickyHeader className={classes.table}></Table> Above this table, there are two drop-downs that are created using ...

Writing CSS rules for generating HTML code when sending emails through the command line in Go

When trying to compose HTML with CSS for email delivery using Go command line execution, errors related to CSS properties are popping up. For instance, it's showing "not found" error in the terminal for properties like background: rgb(255, 255, 255) o ...

Is there a way to enable a clickable imagemap area using jQuery?

Example showcasing different behaviors in various browsers (jsfiddle link): <!DOCTYPE html> <html> <head> <title>Browser Behavior Test</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/ ...

Attempting to dynamically insert a new row into a table using jQuery, with the added condition of limiting the total number of rows to four

I'm facing an issue with a table that has no rows. I want to dynamically add rows by clicking an anchor tag, with a limit of 4 rows. When the limit is reached, I need to display an alert message saying "only 4 rows allowed." However, currently, it kee ...

Utilize a counter to iterate the name repeatedly

echo "<td>".'<input type="text" name="date_from" class="datepicker"/>'."</td>"; Is there a way to utilize a counter to repeat the name attribute and then store it using $_POST[]? ...

Emphasize a portion of a text / Apply formatting to a variable

I am facing an issue where I need to format only the date in a specific string. I have managed to extract the date and store it in a variable after isolating it from the original message. <div class="foo"><p> Click here now and get by January ...

Instead of scrolling through the entire window, focus on scrolling within a specific HTML element

I currently have the following elements: #elementA { position: absolute; width: 200%; height: 100%; background: linear-gradient(to right, rgba(100,0,0,0.3), rgba(0,0,250,0.3)); z-index: 250; } #containerofA { position: fixed; ...

Create a captivating sliding effect on Windows 8 using a combination of CSS and JavaScript

I believe that using css3 alone can achieve this effect, but I'm struggling with understanding properties like 'ease' in css3. This is the progress I have made so far: http://jsfiddle.net/kwgy9/1/ The word 'nike' should slide to ...

Python Selenium is having trouble finding the elements

I've been struggling for hours to extract the specific text from a variety of elements on a website. I attached 2 images in hopes that they will help in identifying these elements by their similarities, such as having the same class name. The black un ...

Ways to Customize the Text Color in the Navigation Bar

Is there a way to change the color of text in my navigation bar to #b3b3b3? It seems like I am limited to the colors provided by bootstrap. How can I work around this limitation? <nav class="navbar" style="color: #b3b3b3; background-col ...

How can a JQuery slideshow be programmed to only iterate once?

Looking to create a slideshow that transitions between images every two seconds? Check out the code snippet below: HTML: <div class="fadeIn"> <img src="img/city.png" class="remimg" id="city"> <img src="img/shop.png" class="remimg" ...

The Dreamweaver code is visible on the design page but does not appear in the live view on the browser

Experimenting with something and created the top section of the site (Logo and menu). However, when I tried to add a table with text, it doesn't appear in the browser preview even though I can see it in the CODE and DESIGN tabs of Dreamweaver. I susp ...

Troubleshooting problem with JQuery window printing capability

After creating a paper with dimensions of 21.0 cm width and 29.7cm height, I encountered an issue where the printer output three papers instead of just two. I am not sure where I went wrong in my setup. You can find the source code here. window.print(); ...

What is the best way to align the 5th and 6th list items to the left using CSS?

I am experimenting with Bootstrap to create a customized navbar. I am encountering difficulties in aligning the login and logout buttons to the right. Is there a way to achieve this? I have included my HTML and CSS code below: HTML code: <body> &l ...

Changing CSS image properties: A step-by-step guide

I've come across a strange conflict between Twitter Bootstrap (2.2.1) and Ad-Gallery in Internet Explorer. It seems that certain lines in bootstrap.min.css are causing issues, preventing images from displaying: img{max-width:100%;width:auto\9;h ...

How to Include HttpClient in an Angular Service

Looking for a service that utilizes http requests? import { Injectable } from '@angular/core'; import { Observable, of } from 'rxjs'; import { HttpClient } from '@angular/common/http'; @Injectable({ providedIn: 'root&a ...