24986

IE6 and IE7 Z-INDEX bug

Question:

After a few lost days, I have given up trying to solve this. So, here is the situation and I'll be really thankful if someone could tell me what I should do:

I have a vertical menu, and the second level of the menu is absolute positioned. The inner <ul> is styled position: absolute; and has a set z-index. The problem is ie6 and ie7-specific, which does not recognize the z-index in an absolute positioned block. If the element was a relatively positioned, there are no problems but I need the element to be positioned absolute.

Are there any suggestions? Thanks a lot to everyone who's going to give their advice or opinion.

Answer1:

Try this if it helps.

Inside absolute div, add a relative div and put your code inside it.

Answer2:

IE6 and IE7 have a z-index <a href="http://www.quirksmode.org/bugreports/archives/2006/01/Explorer_z_index_bug.html" rel="nofollow">bug</a> where each absolutely positioned element creates a new context for the stacking order. It's difficult to tell without seeing the html in question, but try adding position: relative; and z-index: 100 (or something above the z-index of your sub-menus) to the container (parent) of all the elements with position: absolute.

Recommend

  • Custom Google Custom Search (GCS) Text And Styling
  • Google Maps Highlight a particular area
  • JQuery UI with icon on the right side of an hyperlink
  • How to give active menu item different styling
  • how to change url in browser url box?
  • Identifying the browser at server side in php
  • What part of this RegEx is causing it to find no matches in IE7 and IE8?
  • how can [if IE 6] can be taken by IE7?
  • Editable Combo Box Javascript and HTML
  • JavaScript overloading with a callback
  • pandas computation in each group
  • Changing Jupyter Notebook start up folder by modifying “start in” not working any more
  • Sending keystrokes/mouse clicks to a Java program with Autohotkey
  • Django model inheritance, filtering models
  • How can I set a binding to a Combox in a UserControl?
  • C: Incompatible pointer type initializing
  • why xml file does not aligned properly after append the string in beginning and end of the file usin
  • Does it make sense to call System.gc() and Thread.sleep() when working on Bitmaps?
  • Blackberry - Custom EditField Cursor
  • How to match http request and response using Jersey ContainerRequestFilter and ContainerResponseFilt
  • Body moving without any force applied? (Box2d)
  • PHPUnit_Framework_TestCase class is not available. Fix… - Makegood , Eclipse
  • Different response to non-authenticated users and AJAX calls
  • Problems to linebreak with an int in JLabel
  • Why HTML5 Canvas with a larger size stretch a drawn line?
  • Join two tables and save into third-sql
  • Knitr HTML Loop - Some HTML output, some R output
  • How to model a transition system with SPIN
  • Weird JavaScript statement, what does it mean?
  • ORA-29908: missing primary invocation for ancillary operator
  • Rearranging Cells in UITableView Bug & Saving Changes
  • Proper way to use connect-multiparty with express.js?
  • How to set the response of a form post action to a iframe source?
  • Change div Background jquery
  • Android Google Maps API OnLocationChanged only called once
  • Qt: Run a script BEFORE make
  • Django query for large number of relationships
  • reshape alternating columns in less time and using less memory
  • Converting MP3 duration time
  • Conditional In-Line CSS for IE and Others?