simple vertical menu problems in IE7 [solved]

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Locked
kovver

simple vertical menu problems in IE7 [solved]

Post by kovver »

Could anyone take a look at the problems caused in my submenus using IE7?  they disapear on mouse-over... its on my site www.anthros.net

thanks a lot in advance!

David

/* The wrapper determines the width of the menu elements */

#menuwrapper {
width: 128px;
}


/* Unless you know what you do, do not touch this */

#primary-nav {
list-style: none;
margin: 0px;
padding: 0px;
width: 100%;
        margin-left: 0px;
}
#primary-nav ul {
list-style: none;
margin: 0px;
padding: 0px;
width: 128px;
        margin-left: 0px;
}
#primary-nav ul {
position: absolute;
top: 0;
left: 100%;
display: none;
}
#primary-nav li {
      margin-bottom: -1px;
position: relative;
}



/* Styling the basic apperance of the menu elements */

#primary-nav a {

display: block;
margin: 0px;
padding: 5px 10px;
text-decoration: none;
        border-top: 1px solid #23527A;
}


#primary-nav a:hover {

display: block;
margin: 0px;
padding: 5px 10px;
text-decoration: none;
}

#primary-nav li, #primary-nav li.menuparent {
background: #A5C57C url(images/img/on.jpg) no-repeat;
}


/* Styling the basic apperance of the active page elements (shows what page in the menu is being displayed) */

#primary-nav li.menuactive {
  background: #efefef url(images/img/on.jpg) no-repeat;
}


/* Styling the basic apperance of the menuparents - here styled the same on hover (fixes IE bug) */

#primary-nav li .menuparent, #primary-nav li .menuparent:hover, #primary-nav li .menuparenth {

        background: #A5C57C  url(images/img/over.jpg) no-repeat;
}




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

#primary-nav li:hover, #primary-nav li.menuh, #primary-nav li.menuparenth, #primary-nav li.menuactiveh {
  background: #76B0E2 url(images/img/nav.jpg) no-repeat;
      margin-bottom: -1px;
}


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

#primary-nav ul, #primary-nav li:hover ul, #primary-nav li:hover ul ul, #primary-nav li:hover ul ul ul, #primary-nav li:hover ul ul ul ul, #primary-nav li:hover ul ul ul ul ul,
#primary-nav li.menuparenth ul, #primary-nav li.menuparenth ul ul, #primary-nav li.menuparenth ul ul ul, #primary-nav li.menuparenth ul ul ul ul #primary-nav li.menuparenth ul ul ul ul ul {
display: none;
}
#primary-nav li:hover ul, #primary-nav ul li:hover ul, #primary-nav ul ul li:hover ul, #primary-nav ul ul ul li:hover ul, #primary-nav ul ul ul ul li:hover ul #primary-nav ul ul ul ul ul li:hover ul,
#primary-nav li.menuparenth ul, #primary-nav ul li.menuparenth ul, #primary-nav ul ul li.menuparenth ul, #primary-nav ul ul ul li.menuparenth ul  , #primary-nav ul ul ul ul li.menuparenth ul  #primary-nav ul ul ul ul ul li.menuparenth ul  {
display: block;
}



/* IE Hack, will cause the css to not validate */

#primary-nav li, #primary-nav li.menuparent { _float: left; _height: 1%; }
#primary-nav li a { _height: 1%; }
Last edited by kovver on Tue May 08, 2007 7:10 am, edited 1 time in total.
kovver

Re: simple vertical menu problems in IE7

Post by kovver »

anyone?

::)

thnks david
Greg
Power Poster
Power Poster
Posts: 598
Joined: Sun Sep 26, 2004 6:15 pm

Re: simple vertical menu problems in IE7

Post by Greg »

You are missing the following code from the default CMSMS Navigation: CSSMenu - Vertical code
(The  Fixes IE7 lines)

Code: Select all

#primary-nav a { 
   display: block; 
   margin: 0px; 
   padding: 5px 10px; 
   text-decoration: none; 
   border-top: 1px solid #23527A;
  min-height:1em; /* Fixes IE7 whitespace bug*/	 
}

Code: Select all

#primary-nav li, #primary-nav li.menuparent {    
min-height:1em; /* Fixes IE7 bug*/
background: #A5C57C url(images/img/on.jpg) no-repeat;
}
Greg
kovver

Re: simple vertical menu problems in IE7

Post by kovver »

thanka a lot!

david
Metal Beryl
Forum Members
Forum Members
Posts: 69
Joined: Wed Apr 18, 2007 9:57 am

Re: simple vertical menu problems in IE7 [solved]

Post by Metal Beryl »

I have the same problem and it still doesnt work!

Anyone got any other suggestions?

???
Greg
Power Poster
Power Poster
Posts: 598
Joined: Sun Sep 26, 2004 6:15 pm

Re: simple vertical menu problems in IE7 [solved]

Post by Greg »

Here is the working CSS I used for the vertical CSSMenu on one of my sites.

Code: Select all

/* Vertical menu for the CMS CSS Menu Module */
/* by Alexander Endresen */
/* The wrapper determines the width of the menu elements */
#primary-nav, 
#primary-nav ul { 
width: 170px;
margin: 0;
padding: 0;
margin-left: -1px;
list-style: none;
}
#primary-nav ul { 
position: absolute; 
top: 0; 
left: 100%;
}
#primary-nav li { 
margin-bottom: -1px; 
position: relative;
width: 170px; 
}
/* Styling the basic appearance of the menu elements */
#primary-nav a { 
display: block; 
margin: 0px; 
padding: 5px 10px; 
text-decoration: none;
border-bottom: 1px solid #E6D7CA;
border-top: 1px solid #E6D7CA;
color: #18507C;
}
#primary-nav li, 
#primary-nav li.menuparent { 
background-color: #F4F4F6;
}
/* Styling the basic apperance of the active page elements (shows what page in the menu is being displayed) */
#primary-nav li.menuactive { 
background-color: #5F3A23;
}
#primary-nav li a.menuactive, 
#primary-nav li.menuactive visited {
color: #fff; 
font-weight: bold;
}
/* Styling the basic apperance of the menuparents - here styled the same on hover (fixes IE bug) */
#primary-nav li.menuparent, 
#primary-nav li.menuparent:hover, 
#primary-nav li.menuparenth { 
background-image: url(modules/MenuManager/images/arrow.gif);
background-position: center right; 
background-repeat: no-repeat; 
}
/* Styling the apperance of menu items on hover */
#primary-nav li:hover, 
#primary-nav li.menuh, 
#primary-nav li.menuparenth, 
#primary-nav li.menuactiveh { 
background-color: #E1CEAD;
}
/* The magic - set to work for up to a 3 level menu, but can be increased unlimited */
#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; 
}
#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 Hack, will cause the css to not validate */
#primary-nav li, 
#primary-nav li.menuparenth { 
_float: left; 
_height: 1%;
min-height:0; 
}
#primary-nav li a { 
_height: 1%;
min-height:0; 
}
#primary-nav li li a {
width: 180px;
}
#primary-nav li li {
width: 202px; 
z-index: 20;
}
Change the colors  and the width to your liking.

Also make sure you have this code in the head section of your template for IE6

Code: Select all

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

Return to “Layout and Design (CSS & HTML)”