473,472 Members | 2,039 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

dropdown menu problem with IE!

saputello
9 New Member
hello!



i found an article on making a dropdown menu at this page:

http://www.alistapart.com/articles/dropdowns/

i've had no problem making it work in every browser i've tried other than IE!!

perhaps someone can check out the code and let me know what i can do!

Here's the pertinent CSS:
Expand|Select|Wrap|Line Numbers
  1. <style type="text/css">
  2.  
  3.  
  4. #left ul {
  5.     font: 12px/22px Verdana, Arial, Helvetica, sans-serif;
  6.     margin: 0px 0px 0px 0px;
  7.     padding: 0;
  8.     list-style: none;
  9.     width: 150px;
  10.     border-bottom: 1px solid #ccc;
  11.     }
  12.  
  13. #left ul li {
  14.     position: relative;
  15.     }
  16.  
  17.  
  18. #left li ul {
  19.     position: absolute;
  20.     left: 149px;
  21.     top: 0;
  22.     display: none;
  23.     }
  24.  
  25.  
  26. #left ul li a {
  27.     display: block;
  28.     text-decoration: none;
  29.     color: #777;
  30.     background: #fff;
  31.     padding: 5px;
  32.     border: 1px solid #ccc;
  33.     border-bottom: 0;
  34.     }
  35.  
  36.  
  37. /* Fix IE. Hide from IE Mac \*/
  38. * html ul li { float: left; height: 1%; }
  39. * html ul li a { height: 1%; }
  40. /* End */
  41.  
  42. #left li:hover ul, li.over ul { 
  43.     display: block; }
  44.  
  45.  
  46. </style>
  47.  
Javascript for IE:
Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript"><!--//--><![CDATA[//><!--
  2.  
  3. startList = function() {
  4.     if (document.all&&document.getElementById) {
  5.         navRoot = document.getElementById("left");
  6.         for (i=0; i<navRoot.childNodes.length; i++) {
  7.             node = navRoot.childNodes[i];
  8.             if (node.nodeName=="LI") {
  9.                 node.onmouseover=function() {
  10.                     this.className+=" over";
  11.                 }
  12.                 node.onmouseout=function() {
  13.                     this.className=this.className.replace(" over", "");
  14.                 }
  15.             }
  16.         }
  17.     }
  18. }
  19. window.onload=startList;
  20.  
  21. //--><!]]></script>
  22.  

and here's the html:
[html]
<ul>

<li><a href="san_francisco1.html">San Francisco</a>
<ul>
<li><a href="#" id="current">Chinatown</a></li>
<li><a href="downtown1.html">Downtown</a></li>
<li><a href="soma1.html">SoMa</a></li>
<li><a href="mission1.html">The Mission</a></li>
<li><a href="northBeach1.html">North Beach</a></li>
<li><a href="castro1.html">The Castro</a></li>

</ul>
</li>
<li><a href="berkeley1.html">Berkeley</a></li>
<li><a href="santa_cruz1.html">Santa Cruz</a></li>
<li><a href="big_sur1.html">Big Sur</a></li>
</ul>
[/html]

I've tried many variations but can't get it to work.


http://www.nostramerica.com/chinatown2.html


thank you very much!
Apr 9 '08 #1
1 1538
drhowarddrfine
7,435 Recognized Expert Expert
It doesn't work for me in FF either.
Apr 9 '08 #2

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

Similar topics

1
by: LG | last post by:
I have asked before but I did not get all the answer I wanted. Perhaps I explained too bad. I have my site in frames, and the dropdown list is in the 'left' frame, and I have used javascript so...
4
by: Tim | last post by:
Hi, I've been searching the web for hours now and found lots and lots of javascript files with which you can create dropdown menu's, but with all of them you have to specify the width of the...
1
by: Sakharam Phapale | last post by:
Hi All, How to show dropdown list of menu items just like click on Parent menu. For example, Edit (Parent menu) Cut (child menu) Copy (child menu) Paste (child menu)
3
by: ACaunter | last post by:
Hi there, can someone please tell me what the easiest way to have a dropdown menu bar positioned on the screen (eg. Home, company, ... , contact us) then when the mouse goes over then, the sub...
1
by: Dino Buljubasic | last post by:
Hi, I have a toolbar with several buttons on it, one of which is set up to be as a DropDown button. I also have a context menu with menu items assigend to it so when I click that button, my...
4
torquehero
by: torquehero | last post by:
Hi all :) I have created a horizontal navbar using Xara Menumaker. The Menu items have several dropdown menus. Its a javascript. When the mouse cursor is moved over any menu item, a dropdown...
2
by: William Youngman | last post by:
We are developing an application that presents data to the user in a gridview and we are using the dropdown extender to give the user a SharePoint 2007 type dropdown menu attached to the cells of a...
0
by: temp304 | last post by:
Customize Dropdown Menu is designed to display some choices, as: languages, countries, themes,... but it's differrent from original version in browsers. This tool combine CSS and JavaScript to create...
1
by: redgoals | last post by:
Hi, I have searched the forum for a similar problem but have been unable to find anything. What i am trying to achieve is a dropdown menu which behaves in the following way: 1, Someone...
19
by: Jim | last post by:
Hi, I have two questions/problems pertaining to CSS horizontal dropdown menus and am hoping that someone here can help me out. (1) I'm having a problem centering the menu. I picked up the...
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
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...
0
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,...
1
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...
0
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.