473,657 Members | 2,409 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 5841
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
6250
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
4331
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
1946
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
1611
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
2739
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
3675
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
2074
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
3138
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
8395
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
8310
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
8826
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
8732
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
8503
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,...
1
6166
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
5632
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
4155
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...
0
4306
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.