How to keep the Parent and child page highlighted in the menu?

Can someone to modify the code below to highlight the parent menu item when a child page is selected? Thanks.


#nv { overflow: hidden; padding-left: 3px; height: 33px; {MENUBGCODE}; }
#nv li { float: left; padding-right: 1px; height: 33px; line-height: 33px; background: url({IMGDIR}/nv_a.png) no-repeat 100% 0; font-weight: 700; font-size: 14px; }
.ie_all #nv li { line-height: 36px; }
.ie6 #nv li { line-height: 33px; }
#nv li a { float: left; padding: 0 9px; height: 33px; }
#nv li a { color: {MENUTEXT}; }
#nv li span { display: none; }
#nv li.a { margin-left: -1px; {MENUHOVERBGCODE}; }
#nv li.a a { color: {MENUHOVERTEXT}; }
#nv li a:hover { background: url({IMGDIR}/nv_a.png) no-repeat 50% -66px; }
#nv li.hover a:hover, #nv li.hover a { background: url({IMGDIR}/nv_a.png) no-repeat 50% -99px; }
#mu { position: relative; z-index: 1; }
.ie6 #mu, .ie7 #mu { line-height: 0; font-size: 0; }
#mu ul { background: url({IMGDIR}/mu_bg.png) no-repeat 0 100%; line-height: 22px; z-index: 2; font-size: 12px; }
#mu li { float: left; height: 32px }
#mu a { float: left; display: inline; margin: 5px 6px; padding: 0 10px; white-space: nowrap; }
#mu a:hover { margin: 4px 5px; border: 1px solid {SPECIALBORDER}; background: {SPECIALBG}; color: {HIGHLIGHTLINK}; text-decoration: none; }
.floatmu { position: absolute; left: 0; top: 0; }


<div id=“nv”>
<!–{loop $_G[‘setting’][‘navs’] $nav}–>
<!–{if $nav[‘available’] && (!$nav[‘level’] || ($nav[‘level’] == 1 && $_G[‘uid’]) || ($nav[‘level’] == 2 && $_G[‘adminid’] > 0) || ($nav[‘level’] == 3 && $_G[‘adminid’] == 1))}–><li {if $mnid == $nav[navid]}class=“a” {/if}$nav[nav]></li><!–{/if}–>
<!–{if !empty($_G[‘setting’][‘plugins’][‘jsmenu’])}–>
<ul class=“p_pop h_pop” id=“plugin_menu” style=“display: none”>
<!–{loop $_G[‘setting’][‘plugins’][‘jsmenu’] $module}–>
<!–{if !$module[‘adminid’] || ($module[‘adminid’] && $_G[‘adminid’] > 0 && $module[‘adminid’] >= $_G[‘adminid’])}–>
<div id=“mu” class=“cl”>
<!–{if $_G[‘setting’][‘subnavs’]}–>
<!–{loop $_G[setting][subnavs] $navid $subnav}–>
<!–{if $G[‘setting’][‘navsubhover’] || $mnid == $navid}–>
<ul class=“cl {if $mnid == $navid}current{/if}” id="snav
$navid" style=“display:{if $mnid != $navid}none{/if}”>

What kind of html is that? Are you using a template system?

It is from a template system but I don’t use all of the features.

It would be better to grab the generated HTML (view source in your browser) as that is not HTML that we can work with.

Upload your page and give us URL, so we can check and find the solutions.

I am using part of the system like this Chinese site and try to make it work like their menu.

How about posting a link to your own site? I can’t see the point of that link, which tells me nothing about your site. Did you read the posts above?

If it’s all about highlighting the parent and child URLs on website. then I guess using them as secondry menus at any sidebar will be the better option.