Support » Themes and Templates » .sf-menu li.current-cat-parent is not working

  • Need help with a css issue. With a dropdown menu, I’m trying to get the parent menu item of sublinks to stay highlighted when in one of the sublink categories.

    For example, my top menu item is called ‘Work’ and it has sublinks like ‘Interactive’ ‘Print’ ‘Email’ etc. When user has clicked on, say, ‘Email’ I want both ‘Email’ and its parent menu item ‘Work’ to both stay highlighted.

    I now have it so the sublink stays highlighted, but I cannot get the parent menu item ‘Work’ to stay highlighted. Here’s the curent css:

    .sf-menu a:hover{color:#e2007d;}
    .sf-menu li.current-cat a{font-weight:bold;color:#e2007d;}
    .sf-menu li.current-cat a:hover{font-weight:bold;color:#e2007d;}

    I have tried the following css to get the parent item ‘Work’ to stay highlighted, but it’s not working:

    .sf-menu li.current-cat-parent a{font-weight:bold;color:#e2007d;}
    .sf-menu li.current_page_parent a{font-weight:bold;color:#e2007d;}
    .sf-menu li.current_page_ancestor a{font-weight:bold;color:#e2007d;}

    My first goal is to get ‘Work’ to stay highlighted when in a subcategory. After that, I’d like to get ‘Work’ to ALSO stay highlighted if user in viewing a post from one of the subcategories under ‘Work’.

    Here’s a link to the test site to see it:

    Any help would be GREATLY appreciated!

Viewing 1 replies (of 1 total)
  • Note I deleted your duplicate post of the same subject. Please refrain from posting duplicate topics.

Viewing 1 replies (of 1 total)
  • The topic ‘.sf-menu li.current-cat-parent is not working’ is closed to new replies.