Page 1 of 1

[solved] Menu woes: Dropdowns not appearing in IE6 (with proper positioning)

Posted: Thu Jan 01, 2009 4:11 am
by ilene
Here's the link:
http://70.87.187.178/~thecolla/index.php
The dropdowns display and function in Firefox Mac and Safari Mac, but not IE6 (haven't tested other browsers). I've modified the original Horizontal CSS Menu to work with my layout. Any suggestions? Let me know if I can provide any additional info. Thanks.

Code: Select all

/* Horizontal menu for the CMS CSS Menu Module */

/* by Alexander Endresen */

#menu_vert {
   margin-left: 1px;
   margin-right: 1px;
}

/* The wrapper clears the floating elements of the menu */

/* Fix for Opera 8 */
.clearb { clear: both; }
#menuwrapper { 
   /* Fix for Opera 8 */ 
   /*   overflow: hidden;  */ 
   background-color:transparent;
   width: 100%;
}

/* Set the width of the menu elements at second level. Leaving first level flexible. */
#primary-nav li li { 
   width: 150px;
 
}


/* Unless you know what you do, do not touch this */ 
#primary-nav { 
   list-style: none; 
  margin-top: 65px; /* To position navigation properly within purple band */ 
/* Unfortunately, this adds about 65 pixels of padding on top and bottom in IE6, although the navigation is properly positioned*/
   padding: 0px; 
}

#primary-nav ul { 
   list-style: none; 
   margin-top: 5px; /* To position dropdown navigation directly beneath Level1 navigation */ 
   padding: 0px; 
   position: absolute; 
   top:0 auto; 
   display: none; 
}


#primary-nav ul ul { 
   margin-top: 1px;
   margin-left: -1px;
   left: 100%; 
   top: 0px; 
}
	
#primary-nav li { 
   margin-left: -1px;
   float: left; 
}

#primary-nav li li { 
   margin-left: 0px;
   margin-top: -1px;
   float: none; 
   position: relative; 
}

/* Styling the basic appearance of the menu elements */
#primary-nav a { 
   display: inline; 
   margin: 0px; 
   padding: 5px 40px 5px 0px; 
   text-decoration: none; 
   color: #bbc7e3;
}

#primary-nav li li { 
border: 1px solid #3a4c7d;
padding: 2px 0px 2px 5px;
font-size: .95em;
background-color: #bbc7e3; 
}

#primary-nav li li a{ 
color:#3a4c7d;
 }
	
#primary-nav li, #primary-nav li.menuparent { 
   background-color:#768ec6*; 
}

/* This code below is trying to get active page that visitor is on to stand out.*/
/* Styling the basic appearance of the active page elements (shows what page in the menu is being displayed)   Remove the two declarations below to get the menus to treat all pages equally, without identifying page you are currently visiting*/


/* #primary-nav li.menuactive  a{ 
color: #fff;     /* let's the top level nav page stand out but...treats it's baby  dropdown subpages the same way (not like they should be treated, same as all other dropdowns*/               
}*/
/* #primary-nav  li li.menuactive  a{ 
color: #000;  /* targets the active dropdown subpage*/
       
}*/






/* Styling the basic apperance of the menuparents - here styled the same on hover (fixes IE bug) */
#primary-nav ul li.menuparent, 
#primary-nav ul li.menuparent:hover, 
#primary-nav ul li.menuparenth { 
/* arrow for menuparents */
  /*  background-image: url(images/cms/arrow.gif);  */
   background-position: center right; 
   background-repeat: no-repeat; 
}


/* Styling the appearance of menu items on hover */

#primary-nav li a:hover, 
#primary-nav li.menuh, 
#primary-nav li.menuparenth, 
#primary-nav li.menuactiveh { 
  color: #fff; 
}


/* Styling the appearance of menu items on hover */

#primary-nav li li a:hover, 
#primary-nav li li.menuh, 
#primary-nav li li.menuparenth, 
#primary-nav li li.menuactiveh { 
  color: #fff; 
}


/* The magic - set to work for up to a 3 level menu, but can be increased unlimited */

/* 
just add 
#primary-nav li:hover ul ul, 
#primary-nav li.menuparenth ul ul ul,
for fourth level 
*/
#primary-nav ul, 
#primary-nav li:hover ul, 
#primary-nav li:hover ul ul, 
#primary-nav li.menuparenth ul, 
#primary-nav li.menuparenth ul ul { 
   display: none; 
}

/* add 
#primary-nav ul ul ul li:hover ul, 
#primary-nav ul ul ul li.menuparenth ul,
for fourth level
*/
#primary-nav li:hover ul, 
#primary-nav ul li:hover ul, 
#primary-nav ul ul li:hover ul, 
#primary-nav li.menuparenth ul, 
#primary-nav ul li.menuparenth ul, 
#primary-nav ul ul li.menuparenth ul { 
   display: block; 
}


/* IE Hacks */
#primary-nav li li { 
   float: left; 
   clear: both; 
}
#primary-nav li li a { 
   height: 1%; 
} 

Re: Menu woes: Dropdowns not appearing in IE6

Posted: Thu Jan 01, 2009 9:23 am
by TheLastLegion
Does it work fine in IE 7  & the upcoming 8?
If so then don't worry about IE 6... sorry to say but not all browsers will pick it up the exact way they all read differently but its good you got the majority of hte browsers ok

a suggestion would be to have vertical left or right side navigation bar as well

maybe on your site's left side which is mainly blank..

up to you

Re: Menu woes: Dropdowns not appearing in IE6

Posted: Thu Jan 01, 2009 10:15 am
by KO
Check http://forum.cmsmadesimple.org/index.ph ... 533.0.html
There might be solution for you.

Re: Menu woes: Dropdowns not appearing in IE6

Posted: Thu Jan 01, 2009 4:19 pm
by Nullig
It looks like you've not included:





in your template.

Nullig

Re: Menu woes: Dropdowns not appearing in IE6

Posted: Thu Jan 01, 2009 5:31 pm
by ilene
Thanks for the replies everyone. Three things:


(1) I am unable to test this menu in other versions of IE to see if the dropdown works. Could someone please test? The url is:
http://70.87.187.178/~thecolla/index.php

(2) This post is an awesome resource. Any way the information could be included in the documentation wiki?

http://forum.cmsmadesimple.org/index.ph ... 533.0.html

(2) As Nullig suggested, I added the following code to my template header, but the problem was not corrected.

Code: Select all

<!--[if lte IE 6]>
<__script__ type="text/javascript" src="modules/MenuManager/CSSMenu.js"></__script>
<![endif]-->


I'm thinking maybe I don't have the correct javascript file in the right directory. How can I locate the CSSMenu.js file and assure it is in the proper location?

Thanks.

Re: Menu woes: Dropdowns not appearing in IE6

Posted: Thu Jan 01, 2009 6:55 pm
by Dr.CSS
If you go to http://70.87.187.178/~thecolla/modules/ ... CSSMenu.js you will see that it's there, I think you may need to change the if statement, it may be as simple as taking the space out before the first >, if you etill have the default templates you can copy it from there...

Yours...
[/color]

Default...
[/color]

Re: Menu woes: Dropdowns not appearing in IE6

Posted: Thu Jan 01, 2009 7:13 pm
by ilene
That did it Mark -- good catch! Thank you very much! (Now it's on to getting the dropdowns to be properly positioned in IE 6).

Ilene

Re: [SOLVED] Menu woes: Dropdowns not appearing in IE6

Posted: Thu Jan 01, 2009 7:25 pm
by Dr.CSS
It seems like you made a change in the menu CSS under where it says don't mess with this unless you no what your doing ;)...


#primary-nav ul {
  list-style: none;
  margin-top: 5px; /* To position dropdown navigation directly beneath Level1 navigation */
  padding: 0px;
  position: absolute;
  top:0 auto;
  display: none;
}

Should be...

#primary-nav ul {
  position: absolute;
  top: auto;
  display: none;
}

Re: [SOLVED] Menu woes: Dropdowns not appearing in IE6

Posted: Thu Jan 01, 2009 8:43 pm
by ilene
Mark, Thanks for the suggestion,


Implementing it is an "improvement" in IE 6 (although it positions the dropdowns  directly beneath the top level navigation vertically (in IE6), they're too high and they interfere with the position of the top level navigation by forcing top level menu items to "shift to the right" (to move out of the way))

And it also messes up the other browsers (Firefox and Safari, which had been working properly) in the same way.

Any other thoughts?

Re: [SOLVED] Menu woes: Dropdowns not appearing in IE6

Posted: Thu Jan 01, 2009 9:08 pm
by Dr.CSS
Well the original CSS was/is setup to work in all browsers, the part under this is just what is needed to make drop downs just like you want, the only time it would need to be changed would be for a very diff. menu style...

Default...

/* Unless you know what you do, do not touch this */
#primary-nav, #primary-nav ul {
  list-style: none;
  margin: 0px;
  padding: 0px;
}
#primary-nav ul {
  position: absolute;
  top: auto;
  display: none;
}
#primary-nav ul ul {
  margin-top: 1px;
  margin-left: -1px;
  left: 100%;
  top: 0px;
}

#primary-nav li {
  margin-left: -1px;
  float: left;
}
#primary-nav li li {
  margin-left: 0px;
  margin-top: -1px;
  float: none;
  position: relative;
}

Re: Menu woes: Dropdowns not appearing in IE6 (with proper positioning)

Posted: Thu Jan 01, 2009 10:57 pm
by ilene
Mark,
I put it back to the default code like you posted above, but the same issue still exists in IE6 with the dropdowns overlapping the top level horizontal navigation. Still looking for suggestions. Thanks.

Re: Menu woes: Dropdowns not appearing in IE6 (with proper positioning)

Posted: Fri Jan 02, 2009 10:44 am
by KO
IE6 looks same as Firefox 3. So maybe it is as you want it.

Re: Menu woes: Dropdowns not appearing in IE6 (with proper positioning)

Posted: Fri Jan 02, 2009 7:25 pm
by Dr.CSS
I went in and fixed it, 2 menu style sheets, extra */ 's in odd places, etc....