473,799 Members | 2,772 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

IE 8 issue in li ul menu

omerbutt
638 Contributor
hi all,
i have a menu based on <ul> and <li> it is working fine on mozilla all versions IE 6 and 7 all versions and google chrome ver 2.0.172.31 , the only problem is occuring is with the IE8 here is the link ,or you can see the attachment with of the screen grab.
HERE IS THE CODE FOR THAT MENU
Expand|Select|Wrap|Line Numbers
  1. .suckerdiv ul{
  2.     font-family: Arial, Helvetica, sans-serif;
  3.       font-size: 11px;
  4.     margin-left: 0px;
  5.     margin-right:0px;
  6.     margin-top:0px;
  7.     margin-bottom:0px;
  8.     padding-left:0px;
  9.     padding-right:0px;
  10.     padding-top:0px;
  11.     padding-bottom:0px;
  12.     list-style-type: none;
  13.     width: 201px; /* Width of Menu Items */
  14.     border-bottom: 1px solid #592442;
  15.     background: #6F2F53;
  16. }
  17.  
  18. .suckerdiv ul li{
  19.     font-family: Arial, Helvetica, sans-serif;
  20.       font-size: 11px;
  21.     position: relative;
  22. }
  23.  
  24. /*Sub level menu items */
  25. .suckerdiv ul li ul{
  26.     font-family: Arial, Helvetica, sans-serif;
  27.       font-size: 11px;
  28.     position: absolute;
  29.     width: 150px; /*sub menu width*/
  30.     top: 0;
  31.     visibility: hidden;
  32. }
  33.  
  34. /* Sub level menu links style */
  35. .suckerdiv ul li a{
  36.     font-family: Arial, Helvetica, sans-serif;
  37.       font-size: 11px;
  38.     display: block;
  39.     overflow: auto; /*force hasLayout in IE7 */
  40.     color: #FFFFFF;
  41.     text-decoration: none;
  42.     background: #6F2F53;
  43.     padding: 3px 5px;
  44.     border: 1px solid #592442;
  45.     border-bottom: 0;
  46. }
  47.  
  48. .suckerdiv ul li a:visited{
  49.     font-family: Arial, Helvetica, sans-serif;
  50.       font-size: 11px;
  51.     color: #fff;
  52. }
  53.  
  54. .suckerdiv ul li a:hover{
  55.     font-family: Arial, Helvetica, sans-serif;
  56.       font-size: 11px;
  57.     background-color: #6F2F53;
  58.     color: #FF0090;
  59. }
  60.  
  61. .suckerdiv .subfolderstyle{
  62.     font-family: Arial, Helvetica, sans-serif;
  63.       font-size: 11px;
  64.     text-align:left;
  65.     padding-left:50px;
  66.     background: url(../images/arrow.gif) no-repeat center left;
  67. }
  68. /* Holly Hack for IE \*/
  69. * html .suckerdiv ul li { float: left; height: 1%; }
  70. * html .suckerdiv ul li a { height: 1%; }
  71. /* End */
  72.  
Expand|Select|Wrap|Line Numbers
  1. var menuids=["suckertree1"] //Enter id(s) of SuckerTree UL menus, separated by commas
  2.  
  3. function buildsubmenus(){
  4. for (var i=0; i<menuids.length; i++){
  5.   var ultags=document.getElementById(menuids[i]).getElementsByTagName("ul")
  6.     for (var t=0; t<ultags.length; t++){
  7.     ultags[t].parentNode.getElementsByTagName("a")[0].className="subfolderstyle"
  8.         if (ultags[t].parentNode.parentNode.id==menuids[i]) //if this is a first level submenu
  9.             ultags[t].style.left=ultags[t].parentNode.offsetWidth+"px" //dynamically position first level submenus to be width of main menu item
  10.         else //else if this is a sub level submenu (ul)
  11.           ultags[t].style.left=ultags[t-1].getElementsByTagName("a")[0].offsetWidth+"px" //position menu to the right of menu item that activated it
  12.     ultags[t].parentNode.onmouseover=function(){
  13.     this.getElementsByTagName("ul")[0].style.display="block"
  14.     }
  15.     ultags[t].parentNode.onmouseout=function(){
  16.     this.getElementsByTagName("ul")[0].style.display="none"
  17.     }
  18.     }
  19.         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
  20.         ultags[t].style.visibility="visible"
  21.         ultags[t].style.display="none"
  22.         }
  23.   }
  24. }
  25.  
  26. if (window.addEventListener)
  27. window.addEventListener("load", buildsubmenus, false)
  28. else if (window.attachEvent)
  29. window.attachEvent("onload", buildsubmenus)
  30.  
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="javascript:ProductList(<?=$row_cat['cat_id'];?>);" onclick=""><?=$row_cat['cat_name'];?></a>
  21.                             <ul>
  22.                                 <li><? createMenu($row_cat['cat_id']);?></li>
  23.                             </ul>
  24.                         </li>
  25.                     <? }else{?>
  26.                         <li><a href="javascript:ProductList(<?=$row_cat['cat_id'];?>);" onclick=""><?=$row_cat['cat_name'];?></a></li><? 
  27.                     }
  28.                 }//end while
  29.             }?>
  30.             <div class="suckerdiv">
  31.                 <ul id="suckertree1">
  32.                 <? createMenu(0);?>
  33.                 </ul>
  34.             </div>
  35.  
if any one can guide.
regards,
Omer Aslam
Attached Images
File Type: jpg screen grab.jpg (19.3 KB, 1324 views)
Jun 17 '09 #1
5 14814
Markus
6,050 Recognized Expert Expert
The problem being?
Jun 17 '09 #2
omerbutt
638 Contributor
@Markus
kindly see the screen grab and the live site you will notice the error in the left menu the sub-categories menu is appearing under the main-category menu where as it should be hidden and should appear when we hover the main-category
reagrds,
OMer Aslam
Jun 17 '09 #3
Markus
6,050 Recognized Expert Expert
First of all, validate your page (list of errors here)

Note: you have an error in your <meta http-equiv... charset=charset =utf-8> I think you can see the problem there.
Jun 17 '09 #4
Dormilich
8,658 Recognized Expert Moderator Expert
just out of interest, why do you force Javascript on the Suckerfish menu? (except for IE, it usually works without Javascript)
Jun 17 '09 #5
omerbutt
638 Contributor
@Markus
thanks markus good thing pointed out as i fixed all my pages i found out the error it was where i was creating the menu i was calling the creatmenu () inside the li instead of ul and there where the creatmenu () function was written it started with an li too so this is al fixed for IE 8 there was no javascript issue as dormilich was saying
Jun 23 '09 #6

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

Similar topics

6
6875
by: michaelzap | last post by:
I can't seem to remove some extra margin/padding from my design on this site: http://www.kyowa-usa.com/ IE displays it properly (no space between the menus and other elements and the outer border), but in Firefox I always end up with some space. I have tried several box model fixes (to no avail), and I'm no longer sure that's what's going on.
2
3806
by: JMCN | last post by:
hi i'm having a problem with the customize a shortcut menu. i read the ms office assistance: customize a shortcut menu/delete a command or add to a shortcut menu and followed the simple directions. i tried both but for some reason i cannot delete the categories called "filter", "form", etc. eventually i would like to add commands to the "custom" category, ie commands "filter by form, "filter for:" and "filter by excluding" options and...
2
2240
by: lukasz | last post by:
I call contextMenu.Show() in OnMouseDown handler the menu shows and then I press mouse button in other area to hide the menu (without selecting an option). Then I receive first OnMouseUp event, next OnMouseMove, which is very unwanted behavior in my case -- I would prefer to first know that the cursor has moved (and it has moved), only then the fact that a mouse button was pressed. Is there a solution for this? Note: I have not added the...
0
1000
by: Matthew Dill | last post by:
I am attempting to use the following code: Me.LayoutMdi(MdiLayout.TileHorizontal) However, when this code runs the MDI children currently being displayed are not tiled. Nothing happens at all. Is this a known issue with Visual Studio 2003 and/or VB.Net? I originally thought the problem was related to visual inheritance (see previous message below). With some more testing I discovered that other menu options (whether on an MDI child...
2
1668
by: John Smith | last post by:
I am trying to use the menu control for a tabbed menu system but it's frustrating the hell out of me. The full code is listed below. The trouble that I'm having is that, when the user clicks on a menu item, the page will send back the id of the menu that was clicked. But it doesn't do that and I can't figure out how to make it work. Looking at the code below, the variable "strDBView" is always null. But it's a global variable and gets...
1
1605
by: flutetones | last post by:
http://67.189.52.24/~metafusionserver/public_html/training.php Here is a link to my server. I have an issue that doen't make sense. What's hapening is this . . . What's going right . . .
12
5399
by: Reg (Lincolnshire) | last post by:
Converted an A2003 system to A2007, on testing founf out that right- click to bring up a shortcut menu on a combo box didn't work if the combo box was in a subform. Found out that this was a known bug and applied the relevant hotfix. Voila! However, I have now tested the system on a machine with only A2007 runtime installed, and the problem still exists. Why did Microsoft not fix the problem in the runtime exe as well, or am I missing...
4
1421
by: JimmyGiraffe | last post by:
I have some javascript written for a dropdown menu that works fine if my page is an html page, but if I save it as an aspx page it messes up. I'm using an asp grid view control, so I need it to be an asp page. The menu still shows, however it doesn't seem to be reading my x and y coordinates correctly and just puts the menu in the top left of the page. I can post the code if necessary, but I thought/hoped it might just be a setting I...
2
2111
by: DragonMaster | last post by:
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: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> ...
0
9689
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
9550
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
10495
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...
0
10032
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9085
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7573
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
6811
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
5469
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2942
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.