Vanishing CSS Navigation Bar Issue in Safari and Internet Explorer

Struggling with my CSS hover menu on Safari and IE 11. I suspect the issue may be related to z-index, but please check out my JSFiddle for reference. Feeling lost! Any assistance would be greatly appreciated.

If you want to see the live site: rebeckacalderwood.com

JSFiddle Code Reference Link

The CSS: #menu { margin-top: 10px; width: 100%; background: #FFF; }

#menu ul {
text-align: center;
display: inline;
margin: 0;
padding: 15px 4px 17px 0;
list-style: none;
}

#menu ul li {
font-family: 'Lato', sans-serif;
font-weight: 300;
color: #87602F;
display: inline-block;
margin-right: -4px;
position: relative;
z-index: 1;
padding: 15px 50px;
background: #fff;
cursor: pointer;
-webkit-transition: all 0.2s;
-moz-transition: all 0.2s;
-ms-transition: all 0.2s;
-o-transition: all 0.2s;
transition: all 0.2s;
}

#menu ul li:hover {
background: #5B1626;
color: #fff;
z-index: 1;
}

#menu ul li ul {
padding: 0;
position: absolute;
z-index: 100;
top: 48px;
left: 0;
width: 185px;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
display: none;
opacity: 0;
visibility: hidden;
-webkit-transiton: opacity 0.2s;
-moz-transition: opacity 0.2s;
-ms-transition: opacity 0.2s;
-o-transition: opacity 0.2s;
-transition: opacity 0.2s;
}

#menu ul li ul li { 
background: #5B1626; 
display: block; 
color: #fff;
text-shadow: 0 -1px 0 #000;
}

#menu ul li ul li:hover { 
z-index: 100;
background: #87602F; 
}

#menu ul li:hover ul {
z-index: 100;
color: #fff;
display: block;
opacity: 1;
visibility: visible;
}

The HTML:

<div id="menu">
<nav>
<ul>
<a href="profile.html"><li>PROFILE</li></a>
<a href="resume.html"><li>RESUME</li></a>
<li>
<a href style="color: #87602F;"="portfolio.html">PORTFOLIO</a>
<ul>
<a href="album_reviews.html"><li>WORDS</li></a>  
<a href="photos - events.html"><li>PHOTOS</li></a>
<a href="audio.html"><li>AUDIO</li></a>
<a href="video.html"><li>VIDEO</li></a>  </ul>
</li>              
<a href="contact.html"><li>CONTACT</li></a>
</ul>
</nav>
</div>

Answer №1

The code on your website differs from the code on jsfiddle. Here is the HTML snippet from your website:

<nav>
    <ul>
        <a href="profile.html"><li>PROFILE</li></a>
        <a href="resume.html"><li>RESUME</li></a>
        <a href="album_reviews.html"> <li>PORTFOLIO</li></a>
        <a href="contact.html"><li>CONTACT</li></a>
    </ul>
</nav>

Comparing this to the jsfiddle example you provided, it appears that the nested ul is missing in your website's code. Additionally, the #menu ul li:hover ul style is present, but there is a discrepancy in the code structure making it ineffective.

On a side note, the jsfiddle version works perfectly fine in IE11.

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

Having trouble retrieving the value of a textarea within a jQuery UI dialog box

I attempted to place a textarea within a dialog box, with the intention of retrieving the value of that textarea when the "ok" button is clicked. However, I am encountering difficulties in retrieving the value. What could possibly be causing this issue? ...

I'm experimenting with crafting a new color scheme using MUI, which will dynamically alter the background color of my card based on the API

I am attempting to create a function that will change the colors based on the type of Pokemon. However, I'm not sure how to go about it. Any suggestions or ideas!? Check out where I'm brainstorming this logic [This is where the color palette sh ...

Bootstrap Navigation Bar Animation causing Input Fields to be cut off

I am working with a collapsible bootstrap NavBar that contains two elements within the collapsible <div>, <form class="form-inline> and <select class="custom-select" id="menu"> (Refer to my code below) The problem I'm encountering ...

Move the td cell upward by one position

I am currently working with a dynamic table that has the following structure: Here is the code for the table: table tr td LOCATIONS tr(ng-repeat="location in currentSchools.Locations") td td {{location}} Since the table is dyna ...

Add a rotating image with icon/text

Hey there! I've integrated jQuery reel into my website to showcase a 3D view of a site in London. You can see an example here. Now, I'm looking to spice things up by adding some interactive icons and text to 5 specific locations on the images. W ...

adjusting the color of ion-button when hovering over the cancel button

I'm working on a button bar for my app and I want the color of the button to change based on its state (false, true). Currently, the button starts out green, turns light green when hovered over, and becomes white when clicked. Once I click it, the bu ...

applying flexbox for overlay with overflow effect

During the checkout process, I implemented an overlay on top of the website that disables scrolling on the body but allows overflow on the overlay. However, the content on the overlay gets clipped if the viewport is too small. How can this issue be preve ...

The grid display's columns are hidden on smaller screen devices

I am working on a webpage with the following HTML structure: .main { display: grid; grid-template-columns: 1fr 2fr; } .main>div { height: 200px; } .main>div:first-child { border: solid 3px red; } .main>div:last-child { border: soli ...

Preparing to load a CSS file in a Polymer element based on certain conditions

I have numerous CSS files with various animations, and I am interested in dynamically loading a CSS file in a Polymer element based on the animation attribute: Is it feasible to bind the {{animation}} value like this: <polymer-element name="yo-dialog" ...

Unable to achieve desired result when trying to combine styled components props with next adjacent selector

After transitioning from active classes to passing props to styled components, I encountered a minor issue. The prop passing is functioning correctly, but there seems to be an issue with the CSS. Prior to switching to props, this section worked flawlessly ...

How can I access a component variable within the styles in Angular?

Is it possible to utilize a variable width in my Angular 5 component template? I would like to achieve something similar to this: <style> input:checked + .slider:before { transform: translateX({{width}}px); } </style> The &apo ...

Stop click event from firing on a disabled tree node within an angular custom directive template

In the browser, my custom Angular tree component is displayed like this: + Parent 1 + Child 1-A - Child 1-A-A - Child 1-A-B - Child 1-A-C + Child 1-B + Child 1-C This is what the directive template looks like: <ul> &l ...

Tips for Re-positioning the Manage Password Window in a Browser Using CSS

I am facing an issue with the Caps Lock key indication on my login page. When the Caps Lock key is on, a tooltip should be displayed below the password field. However, when the browser's "manage passwords" bubbles are shown, the tooltip gets hidden be ...

Tips for implementing text-overflow ellipsis in an HTML input box?

On my website, I have input fields where I've added the following CSS styling: .ellip { white-space: nowrap; width: 200px; overflow: hidden; -o-text-overflow: ellipsis; -ms-text-overflow: ellipsis; text-overflow: ellipsis; } H ...

How to center an unnumbered list within a DIV while aligning the remaining LI items in the last row to the left

Using the latest version of Bootstrap, I am trying to create an unordered list that displays images in a grid-like format: <div id="featured-products" class="container"> <ul> <li><img src=""></li> <l ...

Tips for navigating a designated section in the "tbody"

https://i.sstatic.net/n75q5.png I plan on navigating horizontally within the highlighted orange section. The concept of implementing this technology is beyond me at the moment. My goal is to minimize the usage of plug-ins as best as I can. If you are k ...

A guide on implementing fadein fadeout animations in React Native using z-index

I am currently working on animating a message to always appear at the top of the screen even when scrolling. The animation triggers perfectly when clicking on onButtonClick from my FlatList component. However, I have encountered a small issue where the A ...

Transforming color images into black and white using JavaScript

     I have implemented this code to convert colored images to grayscale. function applyGrayscaleEffect() {         var imageData = contextSrc.getImageData(0, 0, width, height);         var data = imageData.data;         var p1 = 0.99;   ...

Ways to create a sequential appearance of elements through CSS animations

Can you help me achieve a wave effect for elements appearing one by one using CSS animation (jQuery)? Currently, all the elements show up at once and I want to create a wave-like motion. Any assistance would be greatly appreciated. $(window ...

Column causing div to not scroll

I've set up a bootply template where I have panels in a column on the right side. My goal is to make these panels scroll within the column without affecting the header or footer. However, for some reason, the 'overflow-y: scroll' property do ...