submenu and display question

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"
Post Reply
Roberto
Forum Members
Forum Members
Posts: 24
Joined: Thu Oct 25, 2007 6:37 pm

submenu and display question

Post by Roberto »

Hello comunity, I know that this question has been resolved in so many post before but I can find a solution.

In my horizontal menu, I need that the submenu appears when I am placed in his father. The solution that a find is this:

The solution that I have found here is the following:

Code: Select all

/********************
MENU
*********************/

/* hack for Internet Explorer */
* html div#menu_horiz {
   /* hide ie/mac \*/
   height: 1%;
   /* end hide */
}

/* 
background-color for the entire menu row, 
covering 100% of the width and text center-aligned 
*/
div#menu_horiz {
   background-color: #ffa51b;  /* background color for the entire menu row */
   /*background: url(images/cms/arrow-right.gif) no-repeat 0.5em center;*/
   width: 100%;
   margin: 0;
}

/* 
the menu ul box has top and left border, 
right border is provided by the li elements 
*/
div#menu_horiz ul {
   margin: 0;
   padding: 0;
   border-top: 3px solid #FFF;
   border-bottom: 3px solid #FFF;
   border-left:  1px solid #C0C0C0;
   height:2.2em;
   width: 100%
}

/* menu list items */
div#menu_horiz li {
   float: left; /* makes the list horizontal */
   list-style: none; /* hides the list bullet */ 
   margin: 0 ;
   width: 11.41em;
   text-align: center;
   /*border: 1px solid #f00;*/
}

#menu_horiz li:hover ul, 
#menu_horiz li:hover ul ul, 
#menu_horiz li.menuparent ul, 
#menu_horiz li.menuparent ul ul { 
   display: none; 
}

#menu_horiz li:hover ul, 
#menu_horiz ul li:hover ul, 
#menu_horiz ul ul li:hover ul, 
#menu_horiz li.menuparent ul, 
#menu_horiz ul li.menuparent ul { 
   display: block; 
}
But doesn't work correctly, the children are always visible. Someone can tell how to control this, I'm horrible working with CSS.

any help with activeparent, menuparenth or menuparent(I'm not sure wich is correctly) menuactiveh ...

Thanks
lanesharon

Re: submenu and display question

Post by lanesharon »

For IE 6, you may need a snippet code called hover.htc.  Google it.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: submenu and display question

Post by Dr.CSS »

This is a CSS Menu call, in the default install you will find drop down/fly out menus, horizontal and vertical, if you look at the template you will see the JS call for IE and in the CSS you should note some calls that seem like duplicates with an h on the end these are the ones that IE and the JS use to make it happen...
Post Reply

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