Concealed dropdown menu obscured by the background image

I've reached out to all my contacts and combed through various resources, but I'm still stuck. Seeking assistance from the community now! I'm working on my second website using HTML5 and CSS3 (my first attempt was 7 years ago, and it's pretty cringeworthy now!)

The current hurdle I'm facing: I've created a dropdown menu on one of the tabs in my Nav Bar, but it keeps getting hidden behind the background image and other content on the page. I've experimented with z-index positioning to no avail.

Any suggestions or insights would be highly appreciated! Thank you in advance.

Below is the NavBar HTML Code:

<div id="nav"> 
<ul> 
<li><a href="HomePageNew.html">Home</a></li> 
<li><a href="BioNew.html">Bio</a></li> 
<li><a href="GigScheduleNew.html">Gigs</a></li> 
<li><a href="Groups.html">Groups </a>
    <ul>
    <li><a href="#">SB Trio</a></li>
    <li><a href="#">NYGT</a></li>
    <li><a href="#">Qtto Bloomdido</a></li>
    </ul>
</li> 
<li><a href="">Publications</a></li>
<li><a href="">Repairs</a></li>
<li><a href="">Lessons</a></li>
<li><a href="">Contact</a></li>
</ul> 
</div>

Here's the CSS code for the NavBar:

#nav {    position: relative;   
    top: 0;
    text-align: center;     
    background-color: #FF9933;  
    background-image: url(images/WoodAfromosia.jpg);    
    font-family: "Comic Sans MS", Arial, Helvetica, sans-serif;
    font-size: 130%;}

#nav ul {   list-style: none;   
    padding: 1; 
    margin: 0% 0% 0% 0%;}    

#nav ul li { float: center;
    display:inline-block;
    font-weight: bold; 
    text-transform: uppercase;} 
#nav { overflow: hidden; width: 100%;}

#nav ul li a {display: inline-block;    
padding: .5em; 
background-color: peachpuff;
background-image: url(images/Paperpapyrus.jpg);     
border: 2px solid #000;     
border-radius: .5em; 
margin: 3% 6% 3% 6%;    
white-space:nowrap;}  


#nav ul ul {display: none;}

#nav ul ul li {display: block;
float: left;
text-align: left;
margin: -6.5% 0% 0% -40% ;
width: 100px;} 

#nav li:hover ul { position:absolute; /* Position under correct tab */
display:block;}

#nav li:hover li {  float:none;
overflow: visible;}


#nav ul a:link { color: black;   }  
#nav ul a:visited { color: black;   }  
#nav ul a:focus {   color: blue;  
border-color: #fff; }  
#nav ul a:hover { color: darkviolet; 
border-color: #fff;   }  

#nav ul a:active {color: cyan; }    

Here's the code for the Background Image and Intro Image located just below the NavBar:

body {  position: relative;
padding: 0;             
margin: 0;
background-color: azure;  
background-image: url(images/Paperwhitebricks.jpg;} 

a {text-decoration: none;}  

#intro {text-align: center;
margin: -1% 0% -.5% 0%;}

Answer №1

To solve the problem, simply eliminate the overflow:hidden property from the CSS rule for #nav.

#nav {
    overflow:hidden /* remove */
    width: 100%;
}

You can view the updated code on this fiddle:

JS Fiddle

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

unable to get highcharts to redraw and reflow properly

I am currently working on creating a dynamic page that can display between 1-4 graphs. These graphs need to be able to resize when added or removed from the page. However, I have encountered a major issue with resizing the graphs after resizing the contain ...

The Main page is being graced by a floating Twitter Bootstrap video

When trying to display a video next to a paragraph, I encountered an issue where the paragraph was taking up 100% of the screen and the video was floating over it, obstructing part of the text. Despite setting the row and cols, the layout wasn't behav ...

A guide on accessing checkbox values using jQuery

What is the best way to utilize jQuery in order to retrieve the values of checked checkboxes and instantly input them into a textarea? For example: <html> <head> </head> <body> <div id="c_b"> <input type= ...

Is it possible to refresh the webpage in Angular when the tab is clicked?

Can someone help me find a solution to reload an Angular app's page when the user selects the browser tab? I've been exploring using window.location.reload() for this purpose, but I need guidance on triggering it specifically when the tab is sel ...

Modifying webpage code

I am looking to develop a system where I can edit various elements such as the navbar, paragraphs, and images directly from a web page. I understand that this can be achieved with JavaScript, but I am facing the issue of my customizations reverting to defa ...

I'm feeling a bit lost on where to go next with this JavaScript

I've been working on a project in Python where I need to retrieve a file, store it in an array, and display a random string from the array on HTML. However, I have no experience with JavaScript and am unsure how to proceed. I suspect there may be an i ...

How can I get the bootstrap grid to span across multiple rows?

I'm trying to create a collage of images using Bootstrap 5, but I can't figure out how to make elements span multiple rows. Here's the layout I want to achieve: https://i.sstatic.net/JjnF0.png (guess I don't have a good reputation yet ...

How can I use HTML to display a new image next to the base image when I hover over it, showing both images side by side?

Looking for assistance with creating a comic webpage containing 2 cartoons. I want the dialog or mind-thought of each cartoon to appear on the page when a user hovers over them. Anyone able to offer some help with this? ...

"Maximizing the power of Jquery's .each function. What

In my jQuery code, I have the following: function lshow() { var delayt = 500; var showtime = 5000; var ArrayOfElements = ['.slogan1','.whatwedo','.ekon','.ene', '.ekol', '.sm&a ...

What is the best way to arrange a bootstrap .container?

I've been struggling to position a content DIV on a bootstrap carousel, but so far I haven't been successful in figuring it out. Below is a screenshot of the current output from my code, which is not what I am aiming for. What I'm trying t ...

Creating a bordered triangle using only CSS

Looking to create a message holder with a triangular tip bordered shape? I've successfully crafted the tip using two triangles: #triangle-border { width: 0px; height: 0px; border-style: solid; border-width: 0 100px 80px 100px; bor ...

The container struggles to contain the excess of images spilling over

I'm having trouble getting a group of images to stay within their container in a grid layout, as they're overflowing vertically beyond the container's boundaries. Is there a way to adjust their size so they match the height of their parent ...

Preventing the horizontal scrolling of my application's sticky header

My application layout can be viewed here: http://jsfiddle.net/rhgyLjvx/ The layout includes a main header (red), sticky section header (dark blue), fixed footer (grey), and fixed left side nav (green). The application should have full scroll bars on both ...

Navigate to the end of the chat window using AngularJS

Is there a way to automatically scroll to the bottom whenever a new message is received? I have code that moves the scrollbar, but it doesn't go all the way to the bottom. Can someone please help me with this? Here is my code on Plunker: http://plnk ...

Changing the position from fixed to static

It's strange, but for some reason when I attempt to apply position:fixed using jQuery: $('#footer').css('cssText', 'position:fixed !important;'); to my footer, the result on the page is different: <div id="footer" ...

Ways to emphasize the four edges of a table cell using border-collapse collapse

I am trying to emphasize the borders of cells with the class active. The challenge arises from the fact that the table's border-collapse property is set to collapse, causing the top and left borders of cells (except for the leftmost and top row cells ...

The Datatable is only displaying a single record

After fetching data from a firestore collection and storing them in an array, I encountered an issue where only one entry is displayed in the datatable despite retrieving all documents from the firestore collection. What could be causing this problem? Belo ...

Can you show me how to reposition the button alongside the sidebar?

Currently working on a college project centered around developing a personal website and I could use some assistance with aligning the Button to move along with the sidebar. When clicking on the hamburger menu, the sidebar shifts to the right, and then ba ...

Can you tell me how to include an edit/delete button for each row in a DHTMLX grid?

Currently, I am in the process of using the DHTMLX grid and I want to include an edit/delete button in every row. I have searched on Google for a solution and so far have only come across information about check boxes and links. I would greatly appreciate ...

The contact section refuses to align in the center

New Update! I've been struggling to align my contact information properly on the webpage. Currently, my code is causing all the small logos and text to appear on the side. However, my ultimate goal is to have them all in a single line. Any suggestions ...