Having seen other ModX sites I was impressed and decided to have a go to create my own site. Everything has gone ok, except for a problem with the menu which is driving me nuts! If you can help me out, please drop me a line and save me from going crazy!
The site can be viewed here:
http://www.gall-thomson.co.uk/web/
As you can see the top menu all hovers and functions ok, but I want the selected/active tab to remain in the hover colour, so it’s obvious you are looking at that page. And then when you click on (for example) Marine Breakaway Couplings, that has sibling pages, they appear in the second level menu below. However, when you click on them, they disappear, and I want them to remain where they are and also be selected in colour. I hope this makes sense and you can help.
Thank you, Jamie
Here is my current wayfinder script in the template:
<div id="menu">
[[Wayfinder? &startId=`0` &level=`1`]]
</div>
<div id="content">
<div id="menu2">
[[Wayfinder? &startId=`[*id*]` &level=`2`]]
</div>
And here is the CSS colour script:
#menu
{ background: #83BF93;
color: #339966;
}
#menu li a
{ background: #83BF93;
color: #FFFFFF;
border-color: #339966;
}
#menu li a:hover, #menu li a#selected, #menu li a#selected:hover
{ background: #339966;
color: #FFFFFF;
}
#menu2
{ background: #339966;
color: #339966;
}
#menu2 li a
{ background: #339966;
color: #FFFFFF;
border-color: #339966;
}
#menu2 li a:hover, #menu li a#selected, #menu li a#selected:hover
{ background: #1798E9;
color: #FFFFFF;
}
And finally the CSS style template:
/* navigation menu */
#menu
{ height: 30px;
width: 786px;
margin-top: -30px;
position: relative;
}
#menu ul{margin: 0px auto;}
#menu li
{ float: left;
margin: 0px 0px 0px 0px;
padding: 0px;
list-style: none;
}
#menu li a
{ display: block;
float: left;
height: 22px;
text-decoration: none;
padding: 6px 12px 2px 12px;
}
/* navigation menu2 */
#menu2
{ height: 30px;
width: 786px;
margin-top: 0px;
position: relative;
}
#menu2 ul{margin: 0px auto;
}
#menu2 li
{ float: left;
margin: 0px 0px 0px 0px;
padding: 0px;
list-style: none;
}
#menu2 li a
{ display: block;
float: left;
height: 22px;
text-decoration: none;
padding: 6px 19px 2px 19px;
}