473,404 Members | 2,213 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,404 software developers and data experts.

menu hover problem

omerbutt
638 512MB
hi every one i have a menu li and ul based the problem is when any specific category in the li is hovered the li or the sub-cat items appear but as i move my mouse over the sub-cat or level two li it disappears can any one help in this
here is the link you can watch the left menu here link
here is the code
Expand|Select|Wrap|Line Numbers
  1. var menuids=["suckertree1"] //Enter id(s) of SuckerTree UL menus, separated by commas
  2. function buildsubmenus(){
  3. for (var i=0; i<menuids.length; i++){
  4.   var ultags=document.getElementById(menuids[i]).getElementsByTagName("ul")
  5.     for (var t=0; t<ultags.length; t++){
  6.     ultags[t].parentNode.getElementsByTagName("a")[0].className="subfolderstyle"
  7.         if (ultags[t].parentNode.parentNode.id==menuids[i]) //if this is a first level submenu
  8.             ultags[t].style.left=(ultags[t].parentNode.offsetWidth-2)+"px" //dynamically position first level submenus to be width of main menu item
  9.         else //else if this is a sub level submenu (ul)
  10.           ultags[t].style.left=ultags[t-1].getElementsByTagName("a")[0].offsetWidth+"px" //position menu to the right of menu item that activated it
  11.     ultags[t].parentNode.onmouseover=function(){
  12.     this.getElementsByTagName("ul")[0].style.display="block"
  13.     }
  14.     ultags[t].parentNode.onmouseout=function(){
  15.     this.getElementsByTagName("ul")[0].style.display="none"
  16.     }
  17.     }
  18.         for (var t=ultags.length-1; t>-1; t--){ //loop through all sub menus again, and use "display:none" to hide menus (to prevent possible page scrollbars
  19.         ultags[t].style.visibility="visible"
  20.         ultags[t].style.display="none"
  21.         }
  22.   }
  23. }
  24. if (window.addEventListener)
  25. window.addEventListener("load", buildsubmenus, false)
  26. else if (window.attachEvent)
  27. window.attachEvent("onload", buildsubmenus)
  28.  
Expand|Select|Wrap|Line Numbers
  1. <?
  2. function createMenu($parId){
  3.     $q="select 
  4.         c.cat_id,
  5.         c.parent_id,
  6.         cd.cat_name
  7.     from
  8.         ".CATEGORY." c,
  9.         ".CATEGORY_DESCRIPTION." cd
  10.     where
  11.         (c.cat_id=cd.cat_id)
  12.     and
  13.         (c.parent_id='$parId')";
  14.     $r=execute($q);
  15.     while($row_cat=mysql_fetch_array($r)){
  16.         $q_s="select c.cat_id, cd.cat_name from ".CATEGORY." c, ".CATEGORY_DESCRIPTION." cd where (c.cat_id=cd.cat_id) and c.parent_id='$row_cat[cat_id]'";
  17.         $r_s=execute($q_s);
  18.         $noRows=mysql_num_rows($r_s);
  19.         if($noRows > 0){?>
  20.             <li><a href="products.php?bingo=<?php echo $row_cat['cat_id'];?>" class='WhiteNormal'>&nbsp;&nbsp;&nbsp;<strong>></strong><?php echo "&nbsp;&nbsp;".$row_cat['cat_name'];?></a>
  21.                 <ul>
  22.                     <?php createMenu($row_cat['cat_id']);?>
  23.                 </ul>
  24.             </li>
  25.         <?php }else{?>
  26.             <li><a href="products.php?bingo=<?php echo $row_cat['cat_id'];?>" class='WhiteNormal'><?php echo "&nbsp;&nbsp;".$row_cat['cat_name'];?></a></li><?php 
  27.         }
  28.     }//end while
  29. }?>
  30. <tr>
  31.     <td align="center" valign="middle">
  32.         <table cellspacing="0" cellpadding="0" border="0" align="center" width="230" class="menuHeader_left_top ">
  33.             <tr>
  34.                 <td align="right" valign="middle" width="40"><img src="images/img-019.png" width="11" height="11" border="0" align="middle" alt="none" /></td>
  35.                 <td align="left" valign="middle" class="text_14_grey_dark_bold arrow_bg">&nbsp;&nbsp;CATEGORY</td>
  36.             </tr>
  37.         </table>
  38.     </td>
  39. </tr>
  40. <tr>
  41.     <td align="center" valign="middle">
  42.         <table cellspacing="0" cellpadding="0" align="center" width="234">
  43.             <tr>
  44.                 <td align="center" valign="middle">
  45.                     <table cellspacing="0" cellpadding="0" border="0" align="center" width="234">
  46.                          <tr>
  47.                             <td align="left" valign="middle" width="234">
  48.                                 <div class="suckerdiv">
  49.                                 <ul id="suckertree1">
  50.                                 <?php             
  51.                                     createMenu(0);
  52.                                 ?>
  53.                                 </ul>
  54.                                 </div>
  55.                             </td>
  56.                         </tr>
  57.                     </table>
  58.                 </td>
  59.             </tr>
  60.         </table>
  61.     </td>
  62. </tr>
  63.  
Expand|Select|Wrap|Line Numbers
  1. /*SUCKER DIV MENU*/
  2. .suckerdiv ul{
  3.     font-family: Arial, Helvetica, sans-serif;
  4.       font-size: 14px;
  5.     margin: 0;
  6.     padding: 0;
  7.     list-style-type: none;
  8.     width: 234px; /* Width of Menu Items */
  9.     background: #ffffff;
  10.     z-index:1;
  11. }
  12. .suckerdiv ul li{
  13.     font-family: Arial, Helvetica, sans-serif;
  14.       font-size: 14px;
  15.     position: relative;
  16.     line-height:29px;
  17.     z-index:1;
  18. }
  19.  
  20. /*Sub level menu items */
  21. .suckerdiv ul li ul{
  22.     font-family: Arial, Helvetica, sans-serif;
  23.       font-size: 14px;
  24.     position: absolute;
  25.     visibility: hidden;
  26.     width: 234px; /*sub menu width*/
  27.     top: 0;
  28.     z-index:1;
  29.     border:1px solid #ffffff;
  30.     border-top-color:#e8e8e8;
  31.     border-bottom-color:#e8e8e8;
  32. }
  33. /* Sub level menu links style */
  34. .suckerdiv ul li a{
  35.     font-family: Arial, Helvetica, sans-serif;
  36.       font-size: 14px;
  37.     font-weight:normal;
  38.     display: block;
  39.     overflow: auto; /*force hasLayout in IE7 */
  40.     color:#191c2b;
  41.     text-decoration: none;
  42.     width:232px;
  43.     height:29px;
  44.     z-index:1;
  45.     border:1px solid #ffffff;
  46.     border-right-color:#e8e8e8;
  47.     border-left-color:#e8e8e8;
  48.     background:url(../images/img-014.png) 8px 25px no-repeat;
  49. }
  50. .suckerdiv ul li a:visited{
  51.     font-family:Arial, Helvetica, sans-serif;
  52.       font-size: 14px;
  53.     color: #333333;
  54. }
  55. .suckerdiv ul li a:hover{
  56.     font-family: Arial, Helvetica, sans-serif;
  57.       font-size: 14px;
  58.     width:234px;
  59.     height:29px;
  60.     border:1px solid #FFFFFF;
  61.     border-left-color:#e8e8e8;
  62.     /*background-color: #FF9900;background-color: #FFD89C;*/
  63. }
  64. .suckerdiv .subfolderstyle{
  65.     font-family: Arial, Helvetica, sans-serif;
  66.       font-size: 14px;
  67.     background:url(../images/img-014.png) 8px 25px no-repeat;
  68.     z-index:100;
  69. }
  70. /* Holly Hack for IE \*/
  71. * html .suckerdiv ul li { float:left; height: 1%; z-index:2000;}
  72. * html .suckerdiv ul li a { height: 1%; z-index:2000;}
  73.  
regards,
Omer Aslam
Jun 24 '09 #1

✓ answered by omerbutt

i i have found the problem it was not in this menu but i had another top menu named as lavalamp i downloaded it from here
lavalamp
it is conflicting with the left category menu is ther any option i can fix it
regards,
Omer Aslam

1 3780
omerbutt
638 512MB
i i have found the problem it was not in this menu but i had another top menu named as lavalamp i downloaded it from here
lavalamp
it is conflicting with the left category menu is ther any option i can fix it
regards,
Omer Aslam
Jun 27 '09 #2

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

Similar topics

1
by: Macamba | last post by:
Hi all, I am currently developing a website for a voluntary organisation. It is my first step in website development. The dynamic menu I developed has some bugs, which I addressed in another...
0
by: vikram.cvk | last post by:
Hello Experts, Im trying to design a CSS vertical drop down menu which should have the following functionality. Home About Us | -->Overview
4
by: TycoonUK | last post by:
Hi, As I do not have IE7 on my computer, I was wondering if there is a fault in my CSS Menu when using IE7. Please can someone look at my site - http://www.worldofmonopoly.co.uk and tell me...
4
by: tonsi | last post by:
I have a css menu that works great in IE7 and other browser but when you check it in IE 6 it only shows the first dropdown. I am not that great at css but ANY help would be greatly appreciated. ...
2
by: Ravi Joshi | last post by:
The menu on my site works fine in IE6 and Firefox. In IE7, there is a problem with the menu: when you mouse over the various main catagories, the sub-catagories all appear to the right as they...
2
by: namratha247 | last post by:
Hi, Can anybody please help me with this problem. In my application, I'm using Menus. and the CSS for the menu is as given below ccMenu.css /* Root = Horizontal, Secondary = Vertical */...
3
by: tceramesh | last post by:
Hi Friends, I Created one drop down menu by using CSS. It is perfect in Firefox but in IE it creates some problem. in the header section the drop down menu appear,, below that...
0
by: rahullko05 | last post by:
i have designed a menu list program in which i'm facing a problem where the last li item (white crappie) shifts down when i hover mouse pointer to just above li item (ozrack bazz) of white crappie...
5
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
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...

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.