473,811 Members | 2,665 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

z-index issue on css menu flyout (in IE6)

1 New Member
Hi all,

I am using IE6, and have a problem with css (nearly) only flyout menus. In firefox, it works fine, but in IE6 with the csshover.htc behaviour, I am finding that the 2nd level menu items are being hidden behind other menu items. I have set the 2nd level items to have a high z-index to no avail. Code below:

Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2.  
  3. <html>
  4.   <head>
  5.     <style>
  6.       .menu ul {
  7.         width: 8em;
  8.         background; #edc#
  9.         border-top: 1px solid #000;
  10.  
  11.          padding:0; margin:0; list-style-type: none; float:left;
  12.       }
  13.  
  14.       .menu li {
  15.         list-style: none;
  16.         position: relative;
  17.         border-left: 1px solid #000;
  18.         border-right: 1px solid #000;
  19.         border-bottom: 1px solid #000;
  20.         vertical-align: bottom;
  21.       }
  22.  
  23.       .menu ul a {
  24.         display:block;
  25.         padding: 5px 1px;
  26.         vertical-align: bottom;
  27.       }
  28.  
  29.       .menu ul ul {
  30.         background: #fed;
  31.         position: absolute;
  32.         left: -300px;
  33.       }
  34.  
  35.       .menu ul li:hover ul {
  36.         left:7em;
  37.         top: 4px;
  38.  
  39.         z-index: 100;
  40.         font-size:9px; display:block; position:absolute; top:0; left:145px; width:145px;
  41.       }
  42.     .menu {  margin:0; margin:0px 0; font-size: 9px; }
  43.     .menu ul li a, .menu ul li a:visited { font-size:9px; display:block; text-decoration:underline; color:#00f; width:144px; text-align:center; border:1px solid #fff; border-width:1px 1px 0 0; background:#c9c9a7; border:outset 2px #ddd; }
  44.     .menu ul li {padding:0; clear: both; float:left; margin-right:1px; }
  45.     .menu ul li ul { display: none; }
  46.     /* Non IE attributes */
  47.     .menu ul li:hover a { color:#00f; background:#b3ab79; }
  48.     .menu ul li:hover ul li a:hover { background:#c9c9a7; color:#00f; }
  49.  
  50.     </style>
  51. <!-- Taken from http://www.positioniseverything.net/ -->
  52. <!--[if IE]>
  53.   <style type="text/css">
  54.     body {behavior: url(csshover.htc);}
  55.     ul a, ul, li {height: 1%;} /* Holly hack fix for IE bugs */
  56.     li {
  57.       margin-left: -16px;
  58.       mar\gin-left: 0;
  59.     } /* special rules to correct older IE/win bullet zone problems */
  60.   </style>
  61.  
  62.   <noscript>
  63.     <style type="text/css">
  64.       ul ul {position: static;}
  65.     </style>
  66.   </noscript>
  67.  
  68. <![endif]-->
  69.  
  70. <style>
  71.   #Col1 {
  72.     position:absolute;
  73.     width: 200px;
  74.     left: 100px;
  75.   }
  76.   #Col2 {
  77.     position:absolute;
  78.     width: 200px;
  79.     left: 250px;
  80.   }
  81. </style>
  82.  
  83.   </head>
  84.  
  85.   <body>
  86.     <div class='menu'>
  87.       <div id='Col1'>
  88.         <ul>
  89.           <li style='z-index:10;' > <a href='#'>One</a>
  90.             <ul>
  91.               <li style='z-index:7;'><a href='#'>Here</a></li>
  92.               <li><a href='#'>There</a></li>
  93.               <li><a href='#'>Everywhere</a></li>
  94.             </ul>
  95.           </li>
  96.           <li style='z-index:9;' > <a href='#'>Two</a>
  97.             <ul>
  98.               <li><a href='#'>Here</a></li>
  99.               <li><a href='#'>There</a></li>
  100.               <li><a href='#'>Everywhere</a></li>
  101.             </ul>
  102.         </li>
  103.       </ul>
  104.     </div> <!-- eo 'Col1' -->
  105.     <div id='Col2'>
  106.       <ul>
  107.         <li style='z-index:8;' > <a href='#'>Three</a>
  108.           <ul>
  109.             <li><a href='#'>Here</a></li>
  110.             <li><a href='#'>There</a></li>
  111.             <li><a href='#'>Everywhere</a></li>
  112.           </ul>
  113.         </li>
  114.         <li style='z-index:7;' > <a href='#'>Four</a>
  115.           <ul>
  116.             <li><a href='#'>Here</a></li>
  117.             <li><a href='#'>There</a></li>
  118.             <li><a href='#'>Everywhere</a></li>
  119.           </ul>
  120.         </li>
  121.       </ul>
  122.     </div> <!-- eo 'Col2' -->
  123.   </div> <!-- eo 'menu' -->
  124. </body>
  125. </html>
  126.  
  127.  
I have read that IE6 has z-index issues, but I am at a loss as to how to fix.

TIA
Jul 25 '08 #1
2 2112
tharden3
916 Contributor
Now I'm not sure... and Google could help you with this... but there is probably a function of 'display' that you could use to make it show itself on top. Again, IE always has problems.... I would google some things you can do with display.

P.S.
I can't quite understand why that z-indexing won't work like it should.
Jul 25 '08 #2
tharden3
916 Contributor
Now I'm not sure... and Google could help you with this... but there is probably a function of 'display' that you could use to make it show itself on top. Again, IE always has problems.... I would google some things you can do with display.

P.S.
I can't quite understand why that z-indexing won't work like it should.
Scratch what I said, I looked up all the possible 'display' features. None would be helpful to your problem. I though that maybe because you can make objects disappear with "display: none;" that you might be able to make them appear exclusively on top. But you can't.... I'll keep looking into your problem.
Jul 25 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
912
by: Abs | last post by:
Hi! I'm building a website for some friends in a independent game developing group. The site is almost done but I've come across a bug that only happens in IE6 (I've tested the site with the latest versions of mozilla and opera, too). The problem is a black line appearing over the second menu (the one with the <info/games/download/links/forum> options) that doesn't belong there (as you can see in the first menu).
0
1620
by: Jeroen Sangers | last post by:
Hello, I am having a problem in IE with my menu tabs. I want them to appear alligned on the bottom of my header, and therefore I have positioned my header relatively to set a positioning context, and used absolute positioning to place my menu at the bottom of the header. In Mozilla this approach works perfectly, but IE ignores the positioning context set by the header and places the menu at the bottom of the screen. You can see the page...
4
1784
by: Philippe | last post by:
Hello, I'm a newbee into the javascript world and I'm trying to use the opencube solution to display a complex menu. As I can see, the opencube solution is javascript 1.2. My menu is working just fine into opera or netscape but into IE6 if the menu have to appears on a zone that cover a dropdown list (a simple html <select> tag ) the menu appears behind the dropdown and not in front of it. Is there a solution?
3
1253
by: Mario Schymura | last post by:
Hi everybody. I want to add a new Menu to IE6. I'll use C# and the .NET Framework 1.1 to develop it, but my problem is leck of knowledge concerning IE6 programming. Which Object Model (classes) could be used to realize something that? Which SDK is needed or are the classes already there? To the point: What's the correct tactic to develop that? Regards,
1
8395
by: Richard | last post by:
A menu page has a set of A tages in a UL The menu (in IE) will only get the hover visualization if the mouse rolls over underlined text. I want it to happen if the rollover occurs anywhere in the A cell (which appears to have been expanded to fill the LI container it is in). In FF 1.0.5.2 and Opera 9 things work as expected. How might the CSS be changed to ensure (in IE) the mouse rolling over
0
1788
by: Jack Gray | last post by:
Hi everyone, I am using a nested list for a simple drop-down menu. All CSS and XHTML validate. The menu is displayed properly in 7 different newer browsers including IE7, Firefox, Opera & Safari. I have implemented csshover.htc in the manner I believe is correct. In IE6, the menu displays on two lines instead of a single line and the drop-down (Calendar) does not work (Calendar menu item is not a 'link'). Any clue where the problem...
1
1611
by: raghuvarmabh | last post by:
I am generating dynamic menu using css.the menus are loaded from data base at start up.But i am having some serious problems. 1.The menu is unable to roll over select boxes in IE6.This is very serious problem.And in my project we should use IE6 compulsory.When an menu encounters a select box,the part of menu over the select box is cut and select box is appearing instead of menu. 2.When i use html frames my menu is not rolled over next...
2
1417
by: elasticgurl | last post by:
I'm wondering if anyone has access to ie6 and can view my css and see if they can help me . As it stands, my menu looks different in both mac browsers and IE6. At this point, I haven't tested in IE7. Keeping my fingers crossed for now! What I need the menu is to look like is the menu on this page (with all the same hover background colors, margins and text colors): http://www.gseis.ucla.edu/~edd/www/_saba/index.html The page I need to...
5
5852
by: jerry101 | last post by:
Hi, I've been working on a horizontal drop down menu today, and I can get it to display perfectly in everything bar IE6. Basically instead of them lining up horizontally, they line up vertically instead. And this only happens when I don't give the LI in the menu list and fixed width, which I don't want because if I have a fixed width the menu list get's too long due to some words being longer than others and then it doesn't fit on the...
0
9734
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9607
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10652
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
7673
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6895
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5700
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4346
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3874
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3026
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.