Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1058615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T18:03:04+00:00 2026-05-16T18:03:04+00:00

I have a layout based on absolute positioning and a CSS-based menu in the

  • 0

I have a layout based on absolute positioning and a CSS-based menu in the header area. Everything works fine in Firefox, but in Internet Explorer 7 and 8, the menu dropdowns are covered by the content area. IE simply does not honour the z-index property in this case.

I read about stacking contexts and the z-index bug, but still could not get it to work. Is there some way to fix it without dropping the position:absolute on #content? I can change the positioning method used for the navigation area, though.

Here’s the simplified code:

<!DOCTYPE html>
<html>
<head>
<style>
#nav {margin:0; padding: 0; position: absolute; left: 0; top: 0; right: 0; height: 2em; background: #eee}
#nav > li {float: left; list-style: none; position: relative; }
#nav > li > a {display: block; position: relative; margin: 0; background-color: #eee; padding: 5px; border: 1px solid #eee; text-decoration: none; color: #444;}
#nav > li:hover > a { background-color: #ddd; }

#nav li ul { z-index: 1; display: none; position: absolute; padding: 0; margin: 0; list-style: none; border: 1px solid black; background: #eee; width: 100px; }
#nav li:hover ul {display: inline;}
#nav li ul li {list-style: none; margin: 0; padding: 0; height: 5em; }
#nav li ul li a {display: block; padding: 5px; margin: 0; color: #444; text-decoration: none; white-space: nowrap;}

#content { position: absolute; top: 3em; left: 0; right: 0; bottom: 0; background: #ccc; }
</style>
</head>
<body>

<ul id="nav">
    <li><a href="#">A</a><ul><li>...</li></ul></li>
    <li><a href="#">Group B</a><ul><li>...</li></ul></li>
    <li><a href="#">The third group</a><ul><li>...</li></ul></li>
</ul>

<div id="content"></div>

</body>
</html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T18:03:05+00:00Added an answer on May 16, 2026 at 6:03 pm

    Okay, never mind. Putting an explicit z-index on #nav and #content (2 and 1, respectively) did the trick. Note that the z-index on #nav li ul in the code above is not required.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 545k
  • Answers 545k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I would advise against using the backspace key, since that… May 17, 2026 at 9:02 am
  • Editorial Team
    Editorial Team added an answer (Note: I'll assume that by "decode and dispatch" you mean… May 17, 2026 at 9:02 am
  • Editorial Team
    Editorial Team added an answer Non static properties (alias fields, alias member variables) have their… May 17, 2026 at 9:01 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have the following div layout: Everything is fine when I put normal txt
I have a layout which uses min-width and works great. So I came to
I have a layout that is working, but it has one very annoying problem..
I have an annoying CSS layout problem. I'm trying to float images on a
I have an HTML layout based on tabs (say 5). In each tab I
I have a Rails-based site with a basic two-column layout. On the right is
I have a layout similar to this: <div id=...><img src=...></div> and would like to
I have the following layout for my test suite: TestSuite1.cmd: Run my program Check
I have a mockup layout for something here . Essentially there are sections, columns
I have a page layout for my MOSS '07 site that I want put

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.