473,395 Members | 1,639 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

ie z-index of child UL elements

110 100+
Hey CSS masters,

I've been messing with this for a long time, but can't get it working in IE, and can't figure out how the ie 'fixes' would be used in this kind of situation.

You can view the page here
http://zifimusic.com/testing/broken-hovers.html

Everything works perfectly in firefox, and safari (now), but in IE, the dropdown hovers end up behind the horizontal bars.

It seems that defining a different z-index for the horizontal bars, or removing the 'position' from the css has no effect.

Any ideas on how I can accomplish this?

I am using jquery and the superfish menus for the dropdowns.

Any advice or suggestions would be fantastic.
Pete
Mar 26 '08 #1
2 2211
pedalpete
110 100+
I finally got this sorted out.

completely unintuitive, but i had an element
.shiftMenu li:hover, etc (below), and adding z-index: 1; to this element solved the issue.

I'll leave the solution up for a few weeks in case anybody finds it useful.
The remainder of my code is here in case anybody wants it.

Here is my css, followed by my html
Expand|Select|Wrap|Line Numbers
  1. td {background-color: white;
  2.     padding: 3px;
  3.     width: 120px;
  4.     height: 30px;
  5.     overflow: visible;
  6.     border: 2px solid #999999;
  7. }
  8.  
  9.  
  10. .show, .prep{
  11.     background-repeat: repeat-y;
  12.     background-position: 50% 0%;
  13.     border: 1px solid #7F7F7F;
  14.     font-size: 9px;
  15.     font-weight: bold;
  16.     padding-top: 4px;
  17.     height: 18px;
  18.     overflow: visible;
  19.     text-align: center;
  20. }
  21.  
  22. ul {
  23.     display: block;
  24. margin-top: 3px;
  25. }
  26.  
  27. .addShow, .editShow {
  28.     display: none;
  29.     z-index: 90;
  30. }
  31.  
  32.  
  33.  
  34. .holdshows {
  35.     margin-top: 3px;
  36.     z-index: 1;
  37.     display: block;
  38.  
  39. }
  40. .show {
  41. background-image: url('../images/show.gif');
  42.     background-repeat: repeat-y;
  43.     background-color: #7BBA08;
  44. }
  45. .show span {
  46.     display: block;
  47.  
  48. }
  49. .prep {
  50.     background-image: url('../images/offReq.gif');
  51.     background-color: #F15258;
  52.     border: 1px solid #7F7F7F;
  53. }
  54. /* this is the menu for the show options:
  55.  * http://users.tpg.com.au/j_birch/plugins/superfish/superfish.commented.css
  56.  */
  57.  
  58. /*** ESSENTIAL STYLES ***/
  59. .showMenu, .showMenu * {
  60.     margin:0;
  61.     padding:0;
  62.     list-style:none;
  63. }
  64. .showMenu {
  65.     height: 10px;
  66. }
  67. .dropped{
  68.     position: absolute;
  69.     width:9.45em;
  70. }
  71. .showMenu li ul li,
  72. .showMenu a {
  73.     width: 100%;
  74.     display: block;
  75.     background-image: url('../images/dropBack.gif');
  76.     background-position: 50% 0%;
  77.     text-align: center;
  78.     cursor: pointer;
  79.     background-color: #666666;
  80.     width: 90px;
  81.     padding: 3px;
  82.     color: white;
  83.     font-weight: bold;
  84.     font-size: 10px;
  85.     position: relative;
  86.     top: 0px;
  87.     left: 0px;
  88.     margin-left: auto;
  89.     margin-right: auto;
  90.     border-bottom: 1px solid #CCCCCC;
  91.  
  92. }
  93.  
  94.  
  95. .showMenu a {
  96.     display:block;
  97. }
  98. .showMenu li:hover ul,
  99. ul.showMenu li.sfHover ul {
  100.     left:-1px;
  101.     top:12px;
  102. }
  103. .showMenu li:hover li ul,
  104. .showMenu li.sfHover li ul {
  105.     top:-999em;
  106.  
  107. }
  108. .showMenu li li:hover ul,
  109. ul.showMenu li li.sfHover ul {
  110.     left:9.45em;
  111.     top:-1px;
  112.  
  113. }
  114. .superfish li:hover ul,
  115. .superfish li li:hover ul {
  116.     top: -999em;
  117.  
  118. }
  119.  
  120.  
  121. .dropped a, .dropped li:hover, .dropped li.sfHover,
  122. .dropped a:focus, .dropped a:hover, .dropped a:active, .showMenu li li, .dropped .addshow {
  123.  
  124. }
  125. /*** ORIGINAL SKIN ***/
  126. .showMenu {
  127.     float:left;
  128.     margin-bottom:1.5em;
  129.  
  130. }
  131. .showMenu li:hover, .showMenu li.sfHover,
  132. .showMenu a:focus, .showMenu a:hover, .showMenu a:active {
  133.     color: #666666;
  134.     font-size: 14px;
  135.     z-index: 1;
  136. }
  137.  
  138.  
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. <script type="text/javascript" src="scripts/jquery-1.2.3.js"></script>
  4.  
  5. <script type="text/javascript" src="scripts/jqueryForm.js"></script>
  6. <script type="text/javascript" src="scripts/inplace.js"></script>
  7. <script type="text/javascript" src="scripts/calculation.js"></script>
  8. <script type="text/javascript" src="scripts/suckerfish.js"></script>
  9.  
  10.  
  11. <link rel="stylesheet" type="text/css" href="css/menus.css" >
  12.  
  13. <script type="text/javascript">
  14.  
  15. $(document).ready(function(){
  16.     $("ul.showMenu").superfish();
  17. });
  18.  
  19. </script>
  20. </head>
  21. <body>
  22. <table>
  23.  
  24. <tr>
  25. <td id="date" class="2008-03-27-126" width="120px"><div  class="holdshows" style="poition: relative; left: 35; width: 39.9;"><ul class="showMenu"><li class="show"  style="position: relative; left: 35; width: 39.9;"> 7:30-3:00<ul class="dropped"><li class="s-show" id="gid=20&cid=10&uid=126&showid=406&uid=126&date=2008-03-27&f=s&u=reload">switch show</li><li class="editshow" id="uid=126&sid=51&showid=406&f=e&date=2008-03-27">edit </li><li class="editshow" id="uid=126&sid=51&showid=406&f=d&date=2008-03-27">delete</li>
  26.  
  27.         <li class="addshow" id="date=2008-03-27&uid=126&sid=51&f=n">add show</li></ul></ul></li></ul></div><div  class="holdshows" style="left: 20; width: 79.8;"> <ul class="showMenu"><li  class="prep"style="position: relative; left: 20; width: 79.8;"> 4:00-6:00 
  28.     <ul class="dropped"><li class="addReq" id="uid=126&f=e&date=2008-03-27&cid=10&reqType=1">edit prep </li>
  29.         <li class="addReq" id="uid=126&f=d&date=2008-03-27&cid=10&reqType=1">delete prep</li>
  30.         <li class="addReq" id="date=2008-03-27&uid=126&cid=10&f=n">add prep</li></ul></li><ul></div></td>
  31. <td id="date" class="2008-03-27-126" width="120px"><div  class="holdshows" style="left: 35; width: 39.9;"><ul class="showMenu"><li class="show"  style="position: relative; left: 35; width: 39.9;"> 7:30-3:00<ul class="dropped"><li class="s-show" id="gid=20&cid=10&uid=126&showid=406&uid=126&date=2008-03-27&f=s&u=reload">switch show</li><li class="editshow" id="uid=126&sid=51&showid=406&f=e&date=2008-03-27">edit </li><li class="editshow" id="uid=126&sid=51&showid=406&f=d&date=2008-03-27">delete</li>
  32.  
  33.         <li class="addshow" id="date=2008-03-27&uid=126&sid=51&f=n">add show</li></ul></ul></li></ul></div><div  class="holdshows" style="left: 20; width: 79.8;"> <ul class="showMenu"><li  class="prep"style="position: relative; left: 20; width: 79.8;"> 4:00-6:00 
  34.     <ul class="dropped"><li class="addReq" id="uid=126&f=e&date=2008-03-27&cid=10&reqType=1">edit prep </li>
  35.         <li class="addReq" id="uid=126&f=d&date=2008-03-27&cid=10&reqType=1">delete prep</li>
  36.         <li class="addReq" id="date=2008-03-27&uid=126&cid=10&f=n">add prep</li></ul></li><ul></div></td>
  37. </tr>
  38. <tr>
  39. <td id="date" class="2008-03-27-126" width="120px">
  40.     <div  class="holdshows" style="left: 35; width: 39.9;">
  41.         <ul class="showMenu"><li class="show"  style="position: relative; left: 35; width: 39.9;"> 7:30-3:00
  42.             <ul class="dropped">
  43.             <li class="s-show" id="gid=20&cid=10&uid=126&showid=406&uid=126&date=2008-03-27&f=s&u=reload">switch show</li><li class="editshow" id="uid=126&sid=51&showid=406&f=e&date=2008-03-27">edit </li><li class="editshow" id="uid=126&sid=51&showid=406&f=d&date=2008-03-27">delete</li>
  44.  
  45.         <li class="addshow" id="date=2008-03-27&uid=126&sid=51&f=n">add show</li></ul></ul></li></ul></div>
  46.  
  47.     <div  class="holdshows"> <ul class="showMenu"><li  class="prep" style=" position: relative; left: 5; width: 125.4;"> 1:00-11:00 
  48.     <span class="req">Off Request</span> <ul class="dropped">
  49.  
  50.         <li class="addReq" id="uid=126&f=e&date=2008-03-18&cid=10&reqType=1">edit request </li>
  51.         <li class="addReq" id="uid=126&f=d&date=2008-03-18&cid=10&reqType=1">delete request</li>
  52.         <li class="addReq" id="date=2008-03-18&uid=126&cid=10&f=n">add request</li></ul></li><ul></div>
  53.  
  54.         <div  class="holdshows" style="left: 20; width: 79.8;"> 
  55.             <ul class="showMenu"><li  class="prep" style="position: relative; left: 20; width: 79.8;"> 4:00-6:00 
  56.     <ul class="dropped"><li class="addReq" id="uid=126&f=e&date=2008-03-27&cid=10&reqType=1">edit prep </li>
  57.         <li class="addReq" id="uid=126&f=d&date=2008-03-27&cid=10&reqType=1">delete prep</li>
  58.         <li class="addReq" id="date=2008-03-27&uid=126&cid=10&f=n">add prep</li></ul></li><ul></div></td>
  59.  
  60. <td id="date" class="2008-03-27-126" width="120px"><div  class="holdshows" style="left: 35; width: 39.9;"><ul class="showMenu"><li class="show"  style="position: relative; left: 35; width: 39.9;"> 7:30-3:00<ul class="dropped"><li class="s-show" id="gid=20&cid=10&uid=126&showid=406&uid=126&date=2008-03-27&f=s&u=reload">switch show</li><li class="editshow" id="uid=126&sid=51&showid=406&f=e&date=2008-03-27">edit </li><li class="editshow" id="uid=126&sid=51&showid=406&f=d&date=2008-03-27">delete</li>
  61.  
  62.         <li class="addshow" id="date=2008-03-27&uid=126&sid=51&f=n">add show</li></ul></ul></li></ul></div>
  63. <div  class="holdshows" style="left: 20; width: 79.8;"> <ul class="showMenu"><li  class="prep"style="position: relative; left: 20; width: 79.8;"> 4:00-6:00 
  64.     <ul class="dropped"><li class="addReq" id="uid=126&f=e&date=2008-03-27&cid=10&reqType=1">edit prep </li>
  65.         <li class="addReq" id="uid=126&f=d&date=2008-03-27&cid=10&reqType=1">delete prep</li>
  66.         <li class="addReq" id="date=2008-03-27&uid=126&cid=10&f=n">add prep</li></ul></li><ul></div></td>
  67. </tr>
  68. </table>
  69. </body>
  70. </html>
  71.  
Mar 28 '08 #2
drhowarddrfine
7,435 Expert 4TB
In your original markup, if you had a negative z-index, IE struggles with that and I don't think it works at all.
Mar 29 '08 #3

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

Similar topics

0
by: Don Bate | last post by:
I'm having a problem with the "unique" feature of XML Schema. I'm relatively new to using this feature so it may be that I'm misunderstanding something. Let's assume that I have the following...
4
by: Doug Estep | last post by:
Below is a sample of my XML… <MetaData> <Table name="mytable"> <PrimaryKey name="pk"><Column name="mycolumn"/></PrimaryKey> </Table> </MetaData> <Sequencer> <Table name="mytable">
0
by: Bill C | last post by:
I'm new to this so... Is it possible to create a well formed schema with child elements or do I some how have to use xslt to nest elements within elements to produce my final xml result set. My...
2
by: Thirsty Traveler | last post by:
How would I dynamcially create an XML document of the following form: <ReceiveTSSCallBack xmlns="http://LandAm.EAI.Mainframe.TSR"> <TSSCallBack...
3
by: done4who | last post by:
Heres my problem: my javacript code reads each child element e.g.: <video> <author>skateboard2</author><id>xqWBGvbvw7g</id><title>zach skating</title><length_seconds>100</length_seconds></video>...
1
by: Leeor Chernov | last post by:
Hi , I need an article(Page URL) that shows that child elements on the same level cant have the same name(Validation is illegal...).... for example : <Parent> <item/> <item/> <item/>...
5
by: alainfri | last post by:
Hi, It's interesting if it is possible to use CSS rules for styling child elements inline? What I mean is if there is a way to apply CSS rules like this: <ul style="li{ margin: 0; }"<!-- NOT...
0
by: Peter Larsen | last post by:
Is this really a valid schema design? <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xs:element name="root">...
1
by: Philip Cooper | last post by:
I'm new to XSL and need to know how to transform some XML structured like this: <table> <contents> <DATA>Section 1</DATA> <DATA>Chapter 1</DATA> <DATA>Part...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.