"Highlight" a parent menu item when a child menu item is currently loaded?

Viewing 2 posts - 1 through 2 (of 2 total)
  • #18513
    txbred
    Participant

    I want a bottom border for the parent menu item displayed when the page of a sub-menu item is loaded. What CSS selector do I need to accomplish this? I have also tried adding parent instead of ancestor to the end of #access li.current-menu-item-ancestor > a and also tried parent and ancestor for #access li.current_page_item > a

    Here is my CSS:

    #access a:hover,
    #access li.current_page_item > a,
    #access li.current-menu-item > a ,
    #access li.current-menu-item-ancestor > a{
    	background:rgba(255, 255, 255, .2);
    	color:#fff;
    	text-decoration:none;
            border-bottom: 4px solid #D8D8D8;
    }

    Thanks in advance!

    #18533
    Daniel Tara
    Keymaster

    There is no selector in CSS for the parent of an item, hence you can’t accomplish this with merely CSS.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.