Forums

[resolved] Highlight parent-page (as menu item) on subpages (2 posts)

  1. carlsen.rasmus
    Member
    Posted 1 year ago #

    Hi all,

    As far as I can see, this is a topic a lot of people is struggling with. However - I have been digging the forum without a working solution.

    This is it:

    I like the selected menu-item to stay Current when a child-page is viewed.

    There is a lot of solutions due to hardcoded menus, but I rather not step into that.

    The theme is http://themeid.com/ and the homepage is http://www.clearmindweb.dk

    Look at menu-item 2: http://www.clearmindweb.dk/eksempel-side/ and the subpage: http://www.clearmindweb.dk/eksempel-side/side-under-eksempelside/

    When thats done - ofcourse the "blog" menu-item has to be highlighted when a single post or a category is viewed.

    Any hints?

    ras

  2. carlsen.rasmus
    Member
    Posted 1 year ago #

    Solved (almost):

    this:

    .menu .current_page_item a,  {
    	background-color: #343434;
    }

    went to this

    .menu .current_page_item a, li.current-page-ancestor a,  {
    	background-color: #343434;
    }

    However; still need to find out how to do the same trick with post and categories.

    ras

Topic Closed

This topic has been closed to new replies.

About this Topic