The menu in IE7 seems to have a mind of its own, appearing and

Having trouble with my menu displaying correctly in IE7. It seems to be a stacking issue: the menu initially appears but disappears once the header image and rest of the page load. I've tried adjusting the z-index values in both the menu and its parent elements, but nothing seems to fix it...

Check out the site here:

html {
    height:100%;
}

body, p, a, ul, li, ol, h1, h2, h3, h4, h5, h6 {
    margin:0;
    padding:0;
}

body {
    behavior:url("csshover3.htc");
    font-size:14px;
    font-family:Georgia, "Times New Roman", Times, serif;
    background-color:#bacddb;
    height:100%;
}

h1 {
    font-size:18px;
    color:#752eca;
    text-decoration:none;
}

h2 {
    font-size:14px;
    color:#909090;
    text-decoration:none!important;
}

h3 {
    color:#4d2288;
    font-size:18px;
}

p {
    text-indent:20px;
    color:#000;
}

p a {
    color:#000;
    text-decoration:underline;
}

p.foot {
    text-indent:0px;
}

p.link {
    font-size:18px;
    color:#30F;
    text-decoration:underline!important;
}

a {
    color:#4d2288;
    text-decoration:none;
    outline:none;
}

a:visited {
    color:#4d2288;
}

p a:hover {
    text-decoration:underline!important;
}

label {
    text-align:left;
}

ul#nav {
    padding:5px;
    margin:0px auto;
    width:100%;
    z-index:999;
}

ul#nav li a {
    display:block;
    font-weight:bold;
    padding:2px 10px;
    background:#bacddb;
}

ul#nav li a:hover {
    background:#d9c3f2;
    color:#4d2288;
}

li {
    list-style:none;
    float:left;
    position:relative;
    width:225px;
    text-align:center;
    margin:0px auto;
    margin-right:4px;
    border:1px solid #4d2288;
}

li ul {
    display:none;
    position:relative;
    width:auto;
    top:0;
    left:0;
    margin-left:-1px;
}

li>ul {
    top:auto;
    left:auto;
    border:none;
}

li:hover ul {
    display:block;
}

ul#nav li.current a {
    background:#bb96e4;
}

ul#nav li.current a:hover {
    background:#d9c3f2;
}

<div id="maincontent">
<div id="header">
    <div id="lyr_ddmenu">
        <ul id="nav">
            <li class="current"><a href="index.html" title="Home">Hospice of Missoula</a>
        <ul class="sub">
            <li><a href="charitycare.html" title="Charity">Charity Care</a></li>
            <li><a href="history.html" title="History">History</a></li>
            <li><a href="missionstatement.html" title="Mission Statement">Mission Statement</a></li>
            <li><a href="services.html" title="Services">Services</a></li>
            <li><a href="staff.html" title="Staff">Staff</a></li>
        </ul></li>
            <li><a href="whatishospice.html" title="What is Hospice?">What is Hospice?</a>
        <ul class="sub">
            <li><a href="faq.html" title="Frequently Asked Questions">Frequently Asked Questions</a></li>
            <li><a href="eolinfo.html" title="End-of-Life Information">End-of-Life Information</a></li>
            <li><a href="advanceddirectives.html" title="Advanced Directives">Advanced Directives</a></li>
            <li><a href="helpfullinks.html" title="Helpful Links">Helpful Links</a></li>
        </ul></li>
            <li><a href="volunteering.html" title="Volunteering">Volunteering</a></li>
            <li><a href="contactus.html" title="Contact Us">Contact Us</a>
        <ul class="sub">
            <li><a href="calendar.html" title="Upcoming Events">Upcoming Events</a></li>
            <li><a href="employment.html" title="Employment">Employment</a></li>
        </ul></li>
        </ul>
</div>

Answer №1

#header {
    padding-top: 160px !important;
}
#lyr_ddmenu {
    margin: 0 auto !important;
    position: relative !important;
    left: auto !important;
    top: auto !important;
}
.colmask {
    margin-top: 20px !important;
}

Your code seems to have a number of issues that need addressing. Primarily, it's important to avoid abusing XHTML, limit the use of excessive JavaScript, especially for tasks like creating rounded corners, and most importantly, exercise caution when using 'position: absolute;'.

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

Displaying a progress bar while fetching data in Vue: A step-by-step guide

I am working on developing a progress bar using vue js and bootstrap for my desktop application. Within the template, I have the code that will generate the necessary markup: <div class="container-fluid p-0 vh-100" v-if="isLoading&quo ...

How to enhance the animation of the Material-UI right side persistent drawer

I am currently working on a sophisticated application that includes several drawers. Specifically, I am encountering an issue with the animations of the right side drawer. While the drawers animate correctly, the parent divs do not seem to follow suit. Eve ...

Conditional formatting for form field styles

Is there a way in Angular to conditionally render a material style? For instance, I am looking to apply the following style only to my Password form field text, and only when both input boxes have content: .mat-form-field-appearance-outline .mat-form-fiel ...

Guide to configuring the overflow-y property for individual cells or rows in a Bootstrap-Vue table

Hello there, I am currently using Bootstrap-vue to display data that has been queried from a database. My goal is to have it displayed with an overflow-y style similar to this image. If you know how to achieve this effect, please share your solution. Here ...

Guide to placing the Drawer component beneath the AppBar in Material-UI

Exploring the capabilities of the Material UI drawer component, I'm looking to position the drawer below the appbar. My goal is to have the hamburger icon toggle the drawer open and closed when clicked: opening the drawer downwards without moving the ...

Expanding CSS transition for child elements as they increase in size

I am currently working with Vuetify and have encountered an issue with a v-list-item that contains a title and a subtitle. The problem is that the title is restricted to displaying only one line. If the title exceeds this limit, it gets cut off and shows " ...

Troubleshooting CSS loading issue on iPhone 5 Safari with Responsive Design

I am trying to figure out why my website (Link) is not displaying correctly with responsive design on iPhone5 Safari Browser, even though it works fine on desktop browsers like IE, Chrome, and Safari. It also displays correctly on HTC and Samsung Galaxy de ...

What is the best way to make a line widget that has rounded edges at both the beginning and end?

I've been scouring the internet for a solution to this problem, but so far I haven't had any luck. My goal is to design a horizontal line with dots at each end, similar to this example. Does anyone know how I can achieve this using CSS? I atte ...

My website gets all wonky when I try to resize the browser

Here is a visualization of my website's ideal appearance: However, the actual display varies on different computers. After testing with browsershots.org, I noticed that my website looks messy on most browsers and even when resizing the browser window ...

Invisible style date input value on iPhone mobile devices

My goal is to enhance the appearance of an HTML5 input with a custom icon, using a font pack. Although I mention FontAwesome in this example, in reality, I'm utilizing a different custom font pack. On my mobile device (iPhone X), I can see the calend ...

Collision of CSS styles with a different CSS stylesheet causing conflicts

Currently, I am in the process of developing a website and have encountered a specific issue. Within my page, there are various divs and tables present. I have meticulously crafted classes and styles to customize the appearance of these elements to align ...

Will the Stack() be collected by the garbage collector in .Net?

Within the function myFunction(), I am creating a stack using the code Stack myStack = new Stack(). I am concerned whether the myStack will be collected by the garbage collector if the myFunction() is executed multiple times on the server. If not, could ...

Verifying the status of a checkbox label in Java using Selenium

I am currently working on an automation project using Selenium and I'm struggling to figure out how to check the status of a checkbox input. Has anyone else encountered this issue before? Here is a sample code snippet in JavaScript with jQuery: $("i ...

Concealing table columns using JavaScript - adapt layout on the fly

I am currently implementing a responsive design feature on my website, where I need to hide certain columns of a table when the viewport size decreases beyond a specific point. Initially, I tried using .style.visibility = "collapse" for all <tr> elem ...

Using SVG as a background image on Internet Explorer with zoom capabilities

I am having an issue with my SVG used as a background image: <div class="bubble"></div> Here is the CSS I am using: .bubble { background-image: url(https://beta.creasoft.cz/Images/bubble-small.svg); background-repeat: no-repeat; width ...

What is the process for converting an integer to a constant integer in order to allocate array size on the stack

I am attempting to assign a constant size on the stack to an array of integers #include<iostream> using namespace std; int main(){ int n1 = 10; const int N = const_cast<const int&>(n1); //const int N = 10; cout<<" N ...

The picture is not visible outside the parent container - why is it hidden?

Currently, I am working on project cards and using materialize css's image card to style them. One of the features that I particularly like is how it resizes the picture when included inside a container. This allows me to set a fixed height without wo ...

Expanding the content of :before

I have implemented the code below to enable a hover effect when users hover over an image: &:before ' content: "example image" Background: #444; Padding: 20px Height: 300px Width: 300px Font family: 'open sans' Opacity: 0; ' &: ...

Changing the background color of .pane and .view elements in an Ionic web application using JavaScript

Looking to modify the background-color of two css selectors, .pane and .view, that are located within the ionic.css file. Despite multiple attempts to do so using JavaScript directly in the index.html file, the changes are not reflected. The code snippet ...

The vertical scrollbar appears to be malfunctioning

I'm experiencing an issue where the scrollbar is visible but not functioning as expected. I am utilizing CSS for styling the scrollbar and other layouts, along with HTML to apply the styling. #sub_menu, #content{ display: inline-block; } #sub_ ...