I have downloaded a template and everything works fine except from one thing: It does not mark (or activate) the menu when clicked.
I have a horizontal and vertical menu with separate stylesheets. When a page in the horizontal menu is clicked a sub-menu appears as a vertical menu. I would like to configure it such that the horizontal menu is activated when clicked and stays activated when a sub-page in the vertical menu is chosen. I also want to activate the vertical menu pages when clicked.
I hope you understand. Otherwise, just say so.
Horizontal menu stylesheet:
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: #ECECEC; /* background color for the entire menu row */
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-bottom: 1px solid #C0C0C0;
border-left: 1px solid #C0C0C0;
height:2.2em;
}
/* menu list items */
div#menu_horiz li {
float: left; /* makes the list horizontal */
list-style: none; /* hides the list bullet */
margin: 0 ;
border-right: 1px solid #C0C0C0;
}
/* the links, that is each list item */
div#menu_horiz a {
padding: .6em 1em .6em 1.4em; /* padding inside the list item box */
margin: 0; /* margin outside each list item box */
text-decoration: none; /* no underline for links */
color: #18507C;
background: url(/cmsmadesimple/uploads/Clean_Red/arrow-right.gif) no-repeat 0.5em center; ;
display: block; /* IE has problems with this, fixed above */
}
/* hover state for links */
div#menu_horiz li a:hover {
background-color: #C3D4DF;
}
div#menu_horiz a.activeparent:hover {
background-color: #C3D4DF;
color: #18507C;
}
/* active parent, that is the first-level parent of a child page that is the current page */
div#menu_horiz li.activeparent a {
background: #C42924 url(/cmsmadesimple/uploads/Clean_Red/arrow-down.gif) no-repeat 0.4em center;
color: #fff;
}
div#menu_horiz h3 {
padding: .6em 1em .6em 1.4em; /* padding inside the list item box */
margin: 0; /* margin outside each list item box */
text-decoration: none; /* no underline for links */
color: #fff;
background: #C42924 url(/cmsmadesimple/uploads/Clean_Red/arrow-right-active.gif) no-repeat 0.4em center; ;
display: block; /* IE has problems with this, fixed above */
font-size: 1em; /* instead of the normal font size for <h3> */
}
Code: Select all
/********************
MENU
*********************/
#menu_vert {
padding-left: 0;
margin-left: 1em;
}
/* third level has some padding to have it stand out */
div#menu_vert ul ul ul {
padding-bottom: 0.5em;
}
/* menu li block */
#menu_vert li {
list-style: none;
margin: 0;
border-bottom: 1px solid #c0c0c0;
display: block;
}
#menu_vert ul ul li {
border: none;
}
/** fix stupid ie bug with display:block; **/
* html #menu_vert li a { height: 1%; }
* html #menu_vert li hr { height: 1%; }
/** end fix **/
/* first level links */
div#menu_vert a {
text-decoration:none; /* no underline for links */
display: block; /* IE has problems with this, fixed above */
padding: 0.8em 0.5em 0.8em 1.5em; /* some air for it */
color: #18507C; /* this will be link color for all levels */
background: url(/cmsmadesimple/uploads/Clean_Red/arrow-right.gif) no-repeat 0.5em center;
min-height:1em; /* Fixes IE7 whitespace bug */
}
/* next level links, more padding and smaller font */
div#menu_vert ul ul a {
font-size: 90%;
padding: 0.5em 0.5em 0.5em 2.8em;
background-position: 1.5em center;
}
/* third level links, more padding */
div#menu_vert ul ul ul a {
padding: 0.3em 0.5em 0.3em 4.3em;
background: url(/cmsmadesimple/uploads/Clean_Red/dash.gif) no-repeat 2.8em center;
}
/* hover state for all links */
div#menu_vert a:hover {
background-color: #C3D4DF;
}
div#menu_vert a.activeparent:hover {
background-color: #C3D4DF;
color: #18507C;
}
/*
active parent, that is the first-level parent
of a child page that is the current page
*/
div#menu_vert li a.activeparent {
background: url(/cmsmadesimple/uploads/Clean_Red/arrow-down.gif) no-repeat 0.4em center;
background-color: #385C72;
color: #fff;
}
div#menu_vert ul ul li a.activeparent {
background-position: 1.5em center;
background-color: transparent;
color: #18507C;
}
/*
current pages in the default Menu Manager
template are unclickable. This is for current page on first level
*/
div#menu_vert ul h3 {
background: url(/cmsmadesimple/uploads/Clean_Red/arrow-right-active.gif) no-repeat 0.4em center;
background-color: #385C72;
display: block;
padding: 0.8em 0.5em 0.8em 1.5em; /* some air for it */
color: #fff; /* this will be link color for all levels */
font-size: 1em; /* instead of the normal font size for <h3> */
margin: 0; /* as <h3> normally has some margin by default */
}
/*
next level current pages, more padding,
smaller font and no background color or bottom border
*/
div#menu_vert ul ul h3 {
font-size: 90%;
padding: 0.3em 0.5em 0.3em 2.8em;
background-position: 1.4em center;
background-color: transparent;
border-bottom: none;
color: #000;
}
/* current page on third level, more padding */
div#menu_vert ul ul ul h3 {
padding: 0.3em 0.5em 0.3em 4.3em;
background: url(/cmsmadesimple/uploads/Clean_Red/arrow-right-active.gif) no-repeat 2.7em center;
}
/* section header */
div#menu_vert li.sectionheader {
border-right: none;
font-size: 130%;
font-weight: bold;
padding: 1.5em 0 0.8em 0;
background-color: #fff;
line-height: 1em;
margin: 0;
text-align:center;
}
/* separator */
div#menu_vert li.separator {
height: 1px !important;
margin-top: -1px;
margin-bottom: 0;
padding:2px 0 2px 0;
background-color: #000;
overflow:hidden !important;
line-height:1px !important;
font-size:1px; /* for ie */
}
div#menu_vert li.separator hr {
display: none; /* this is for accessibility */
}
Thanks in advance.
/Napoleon.