Yet another IE8 CSS dropdown in shambles

This particular PyroCMS site is quite dynamic, which is why using jsfiddle for posting doesn't work as smoothly. The menu seems to be functioning properly in all major current browsers and their versions, except for IE7, which is not supported. However, in IE8, only the lists and sublists are visible, but not the complete menu. What could be causing this issue?

The CSS:

nav ul#head-nav 
{ 
    width: 700px;
    height: 35px; 
    float:right;
    position:relative;
    margin:10px 0 0 0;
    padding-top:10px;
    bottom:90px; 

}
nav ul#head-nav ul 
{ 
    position: absolute;
    left:-30px;
    top:26px;
    visibility: hidden; 
    z-index: 1000; 
}

nav ul#head-nav li 
{ 
    font-family:Lato;
    font-weight:700;
    font-variant:small-caps;
    background: url('../img/body-bg.jpg') top left repeat; 
    border-top-left-radius:5px;
    border-top-right-radius:5px;
    moz-border-top-left-radius:5px;
    moz-border-top-right-radius:5px;    
    position: relative;
    height:30px; 
    list-style: none; 
    padding-top:10px;
    margin-left:1.5px;
    margin-right:1.5px;
    float: left; 
    text-align:center;
    min-width:115px;
}
nav ul#head-nav .first
{ 
    min-width:90px;
}
nav ul#head-nav li:hover
{ 
background:#5a81a0;
}

nav ul#head-nav li a, ul#head-nav li a:visited
{ 
    font-size: 16px;
    color: white;
    text-decoration:none;
}
nav ul#head-nav li a:hover, ul#head-nav a:visited:hover 
{ 
    color: #ff6900; 
    text-decoration: none; 
}

/* Header Menu second level */
nav ul#head-nav li:hover ul 
{ 
    visibility: visible; 
}
nav ul#head-nav ul li 
{ 
    min-height:20px;
    height:auto;
    width:200px;
    display: table-cell;
    vertical-align: middle;
    border-radius:0px;
    border: 1px solid #e9e9e9; 
    padding: 3px; 
    background: #d8d8d8; 

}
nav ul#head-nav ul li:hover 
{ 
    background:#5a81a0; 
    visibility: visible; 
}

/* Header Menu third level */
nav ul#head-nav ul ul li 
{ 
    visibility: hidden; 
}
nav ul#head-nav ul li:hover ul li 
{ 
    visibility: visible; 
}
nav ul#head-nav ul ul 
{ 
    left:177px; 
    top:-15px;  
    padding-top: 0; 
}

And here's the HTML structure:

<nav>
        <ul id="head-nav">
          <li class="first current"><a href="http://127.0.0.1/home">Home</a></li>
          <li class="has_children"><a href="http://127.0.0.1/about-us">About Us</a>
            <ul class="dropdown">
              <li class="first"><a href="http://127.0.0.1/about-us/who-is-who">Who is Who</a></li>
              <li><a href="http://127.0.0.1/about-us/bylaws">Bylaws</a></li>
              <li><a href="http://127.0.0.1/blog">Blog</a></li>
              <li><a href="http://127.0.0.1/about-us/meetings">Meetings</a></li>
              <li><a href="http://127.0.0.1/about-us/trustees">Trustees</a></li>
              <li><a href="http://127.0.0.1/about-us/history">History</a></li>
              <li><a href="http://127.0.0.1/about-us/intergovernmental-agreement">Intergovernmental Agreement</a></li>
              <li><a href="http://127.0.0.1/about-us/staff">Staff</a></li>
              <li class="last"><a href="http://127.0.0.1/about-us/contact-us">Contact Us</a></li>
            </ul>
          </li>
          (and so on...)
        </ul>
      </nav>

Answer №1

Consider adding the following to your HEAD section

<meta http-equiv="X-UA-Compatible" content="IE=100" >

In addition, if you encounter this issue, navigate to Tools --> Compatibility Mode and ensure it is disabled. I faced a similar problem and disabling Compatibility Mode resolved my menu functionality (which was previously not working).

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

Website route organization tool

Seeking assistance with implementing a route planning feature on my website. The user should be presented with multiple route options upon entering their origin and destination. Take a look at this reference site for inspiration: Any help would be great ...

Steps for showing information from a JSON array with jQuery

I'm trying to retrieve array data from a JSON response sent by my PHP script. The PHP code below gets the user table rows and encodes them into JSON: <?php //connects to database include 'connect.php'; $callback = $_GET['callback&ap ...

Loss of styling is observed with jQuery's html() function

Here is the HTML code I am working with: <div class="myList"> <select> <option value="1">Item1</option> <option value="2">Item2</option> </select> </div> Everything looks great in terms of CS ...

Set the CSS/HTML to make two child elements occupy 50% of the height of the parent container div

This task seems deceptively simple, yet I am struggling to find a straightforward solution. Language: (HTML) <div class="col-6-12 subcontent-outer"> <div class="subcontent"> <h1>Header</h1> ...

The issue with CSS filter invert not functioning properly in Mozilla Firefox is causing complications

I am currently developing a small Firefox add-on designed to make reading pages at night more comfortable. The goal is to invert page colors without affecting images. Here is the code snippet I am using: document.body.style.filter = "invert(100%)"; var i ...

Utilizing the Bootstrap grid system to seamlessly display images

I have been attempting to design a column that is divided into two nested columns, each containing images that should fill the entire height and width of their respective columns. However, I am facing an issue where the images are extending beyond the boun ...

Guide to activating the 'Next' button on WP Forms using JavaScript code when certain conditions are fulfilled

Is there a way to adjust the JavaScript code provided so that the visibility of the "Next" button is dependent on whether at least one item in the 'wpforms-icon-choices-item' class has the '.wpform-selected' class on the current page or ...

Alter the background-color of the parent div when an input is checked using CSS

.chk-circle { width: 8px; height: 8px; background: #afb0b5; border-radius: 100%; position: relative; float: left; margin-top: 4px; margin-right: 8px; } .chk-circle label { display: block; wi ...

Issue with negative margin not functioning properly in Internet Explorer 7

My code snippet looks like this: <style> .earthlogo{float: right; margin: -270px 0px 0px 0px;} </style> <div class="banner"> <p>ENVISIONING A BETTER TOMORROW</p> <div class="earthlogo ...

Tips for clearing out text in a <p> tag with javascript when it exceeds a specific length of 100 characters

Is there a way to automatically truncate text to (...) when it exceeds 100 characters inside a paragraph with the class .class? For instance, if I have a long paragraph like this: <div class='classname'> <p>Lorem ipsum dolor sit ame ...

Convert the provided text into a clickable button

I've been attempting to mirror this function: and: I'm currently utilizing JS and Vue to develop my web application. Any advice on navigating through the current dilemma I find myself in would be greatly appreciated. So far, I have successfully ...

Primeng Growl component in Angular doesn't wrap text to the next line

Currently, I am facing an issue in Angular/Javascript where the text in growl is not wrapping using primeng 4.0.1. The problem arises when inserting a long file path into the growl, causing it to overflow from a single line. I am looking for a solution tha ...

Using jQuery to find the index of an element with a particular child

I am working with three different div containers. <div class="box"></div> <div class="box"> <span class="item">my item</span> </div> <div class="box"></div> Within these containers, there is an item pla ...

Issues with the dropdown menu functionality occurring on a .Net6 MVC app razor page

I recently created a dropdown menu using bootstrap. It functions perfectly when I load an HTML file in VScode. However, I encountered an issue when I tried using the same dropdown markup in a .NET6 MVC app's .cshtml file. When I click on the dropdown ...

What is the method for manually setting the page_source in Python3 using Selenium?

Currently, I am developing an application utilizing selenium. My understanding is that the webdriver.Firefox's get method can be used to retrieve a webpage in the following manner: driver = webdriver.Firefox(executable_path=r'geckodriver&apo ...

Learn how to use jQuery to fetch data and dynamically display it on a webpage

Looking to retrieve data from MySQL using jQuery and dynamically display it on a web page. I attempted the following code but encountered issues. <html> <head> <script src="jquery-1.7.2.js"></script> </head> <body> &l ...

Display website content with a Bootstrap modal popup

When using the bootstrap modal popup, it's important to ensure that the content displayed does not already exist on the page. The issue of images from the page appearing on the popup is demonstrated in the image linked below. Can someone provide guida ...

Is there a mistake in the way I am creating a horizontal navigation bar?

Currently working on creating a simple navigation bar using HTML/CSS for a Java/Spring Boot project. Admittedly, my HTML/CSS skills are quite limited as you can see below. I'm aware that there might be some mistakes in my approach. Thank you in advanc ...

Set a dynamic Active Class on various divisions by utilizing their respective indexes

I have two divs with the same class. When I click on an anchor tag within one of the elements, I want to add a class to the corresponding position in the second div as well. Mirror: JSFiddle Here is the jQuery code snippet: $(document).on('click ...

In Internet Explorer 7, z-index 1 does not display correctly

I am trying to apply z-index: -1; to a div with the class "ie7" that is positioned relative. This div is nested within another div that is also positioned relative. It seems to work in all IE browsers except for IE 7. Any assistance on this matter would ...