473,890 Members | 1,930 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with horizonal dropdown css menu in IE6...

28 New Member
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 page!

the website is currently hosted at www.tri-websites.com

it will ask for a username & password

username - trisynergy
password - fsr

some people have said it may be because of the csshover.htc file I have in there as it is linked at the top of the page for if IE, but IE7 work's fine with it so I'm not sure if that's the problem!

the css for it is shown below

Expand|Select|Wrap|Line Numbers
  1. /* Begin CSS Drop Down Menu */
  2.  
  3. #menuh-container
  4.     {
  5.     }
  6.  
  7. #menuh
  8.     {
  9.     font-family:Verdana, Arial, Helvetica, sans-serif;
  10.     font-size:0.8em;
  11.     float:left;
  12.     position:absolute;
  13.     left:0;
  14.     top:0;
  15.     }
  16.  
  17. #menuh a
  18.     {
  19.     text-align: center;
  20.     display:block;
  21.     border: 1px solid #555;
  22.     white-space:nowrap;
  23.     margin:0;
  24.     padding-top: 0.2em;
  25.     padding-left:1em;
  26.     padding-right:1em;
  27.     }
  28.  
  29. #menuh a:link, #menuh a:visited, #menuh a:active    /* menu at rest */
  30.     {
  31.     color: white;
  32.     background-image:url(../images/navbarbgsmall.jpg);
  33.     background-repeat:repeat;
  34.     text-decoration:none;
  35.     height:25px;
  36.     }
  37.  
  38. #menuh a:hover                        /* menu on mouse-over  */
  39.     {
  40.     color: white;
  41.     text-decoration:underline;
  42.     }    
  43.  
  44. #menuh a.top_parent, #menuh a.top_parent:hover  /* attaches down-arrow to all top-parents */
  45.     {
  46.     background-image:url(../images/navbarbgsmall.jpg);
  47.     background-repeat:repeat;
  48.     }
  49.  
  50. #menuh a.parent, #menuh a.parent:hover     /* attaches side-arrow to all parents */
  51.     {
  52.     background-image:url(../images/navbarbgsmall.jpg);
  53.     background-repeat:repeat;
  54.     }
  55.  
  56. #menuh ul
  57.     {
  58.     list-style:none;
  59.     margin:0;
  60.     padding:0;
  61.     float:left;
  62.     }
  63.  
  64.  
  65. #menuh li
  66.     {
  67.     position:relative;
  68.     min-height: 1px;        
  69.     vertical-align: bottom;            }
  70.  
  71. #menuh ul ul
  72.     {
  73.     position:absolute;
  74.     z-index:500;
  75.     top:auto;
  76.     display:none;
  77.     padding: 1em;
  78.     margin:-1em 0 0 -1em;
  79.     }
  80.  
  81. #menuh ul ul ul
  82.     {
  83.     top:0;
  84.     left:100%;
  85.     }
  86.  
  87. div#menuh li:hover
  88.     {
  89.     cursor:pointer;
  90.     z-index:100;
  91.     }
  92.  
  93. div#menuh li:hover ul ul,
  94. div#menuh li li:hover ul ul,
  95. div#menuh li li li:hover ul ul,
  96. div#menuh li li li li:hover ul ul
  97. {display:none;}
  98.  
  99. div#menuh li:hover ul,
  100. div#menuh li li:hover ul,
  101. div#menuh li li li:hover ul,
  102. div#menuh li li li li:hover ul
  103. {display:block;}
  104.  
  105. /* End CSS Drop Down Menu */
  106.  
any ideas? thanks!
Apr 8 '09 #1
5 5857
Dormilich
8,658 Recognized Expert Moderator Expert
IE usually needs a Javascript workaround for the incomplete :hover implementation (:hover works only on anchors)

edit: your htc file may cover that though…
Apr 8 '09 #2
jerry101
28 New Member
@Dormilich
yeah the htc file should work as it's been used before. I'm pretty sure the link to it in the html is fine.

Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>Home | FSR Maintenance</title>
  6. <meta name="keywords" content="FSR Maintenance, Electrical Maintenance , Mechanical Installation, Mechanical Maintenance, Industrial and Commercial Relocation, Crane Services, Mini Crane Hire, Project Management, Health and Safety, NICEIC Approved Company" />
  7.  
  8. <meta name="description" content="FSR Maintenance provide a complete design and installation through  to maintenance and testing. FSR have over 40 years experience backed up by NICEIC approval and ISO 9001:299 accreditation. Contact Us for a personalised quotation." />
  9. <link rel="stylesheet" type="text/css" href="css/menuh.css" />
  10. <link rel="stylesheet" type="text/css" href="css/layout.css" />
  11. <script src="javascript/equalcolumns.js" type="text/javascript"></script> 
  12. <!--[if lt IE 7]>
  13. <style type="text/css" media="screen">
  14. #menuh{float:none;}
  15. body{behavior:url(css/csshover.htc); font-size:100%;}
  16. #menuh ul li{float:left; width: 100%;}
  17. #menuh a{height:1%;font:bold 0.7em/1.4em arial, sans-serif;}
  18. </style>
  19. <![endif]-->
I've got it in a folder called css, and that link should be fine as it's the same as any other link to that css folder.
Apr 8 '09 #3
Dormilich
8,658 Recognized Expert Moderator Expert
if you've got time to spare, you could try if using the Javascript solves the problem
Apr 8 '09 #4
jerry101
28 New Member
I've actually started doing it using something else, so I've decided to scrap the previous bit I was doing! On a tough time scale so need to keep going with it!
Apr 8 '09 #5
David Laakso
397 Recognized Expert Contributor
You appear to be using this menu:
http://sperling.com/examples/menuh/
Re-read the instructions for its implementation in IE/6-- particularly as it regards the inclusion of and path for the file csshover.htc. Follow it exactly as he has done and all could be well.

It is difficult to give you anymore specific help as you are working on the file; consequently, impossible to hit a moving target. And a locked directory makes it even more difficult.
Apr 8 '09 #6

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

Similar topics

9
6261
by: Faz | last post by:
Hi I'm having some real trouble with a header I have created within a container. I have two problems; firstly the menu (a horizontal UL) will not centre within the surrounding header, despite attempts to use the following within the #header declaration: margin-left: auto; margin-right: auto; The image above the list is easily centred using the 'text-align' property,
6
4343
by: Adrienne | last post by:
http://www.intraproducts.com/beta/infinicall/index.asp has a drop down menu on Investor Relations. The markup and CSS are both valid, and most of the time, the menu drops down correctly. However, sometimes, mousing over the words does not make the menu drop down, or the drop down disappears. Can anyone spot anything in the markup or CSS that is causing this behavior? Thanks in advance.
4
1965
by: Ian Davies | last post by:
Hello I have two drop down menus in my php script. The items displayed in the second is dependent on which item is choosen from the first i.e. the choosen item from the first filters the items in the second first dropdown menu sub no sub 1 science >>>>>>>>> if this is selected 2 maths 3 something else
2
1620
by: Ian Davies | last post by:
Hello Ive been informed that I need to do the following in javascript. I have two drop down menus in my php script. The items displayed in the second is dependent on which item is choosen from the first i.e. the choosen item from the first filters the items in the second first dropdown menu sub no sub 1 science >>>>>>>>> if this is selected 2 maths
7
2746
by: AlisonMooreSmith | last post by:
I'm trying use this code: Listmatic 2 Blues Clues to make a horizontal menu with horizonal submenus, using lists. I got the general code up, but I have two problems. (1) I don't know why the submenu that goes with the sixth menu item is the one that is visible, instead of the submenu that goes with the first (2) I don't know how to get the "current" function to work--this sets the text to bold for the menu and submenu that are...
19
3723
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 code for this from a tutorial but that menu was flush-left justified. Not what I want. Subsequent searches on google on how to center yielded a
10
2090
by: AJM Project | last post by:
Hello, I've been trying to make a horzontal menu and I'm getting different results in IE. Also I've tried different ways of positioning and was wondering what is the best way. Underneath is the code for the html and CSS of the menu. I have also attached images of what I mean by different results, hover over them to see. Firefox 3 (works fine): http://img155.imageshack.us/img155/7109/ff3qc9.jpg Opera 9.51 (works fine):...
1
3154
by: paulyXvpf | last post by:
Hello javascript folks, PROBLEM: Javascript dropdown problem in IE 6 and IE7 DESCRIPTION: menu falls behind a container box on web page COMMENTS: It works fine in Firefox but not in IE 6/7 versions Notice this URL using IE6/7: http://iimaaconference.com.yourtempsite.com/
0
9814
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
11214
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
10801
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10903
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10449
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...
1
8006
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...
1
4659
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
4257
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3266
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.