Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS wordpress – how to keep parent menu stay highlighted on child page?

  • This topic is empty.
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #282390
    Bones_Jones
    Participant

    hi guys,

    i have a noob question.

    here is the link to wordpress website
    https://tinyurl.com/y8akcwsj

    when i click on PROJECTS, it turns blue. it stays blue. When i click on an individual project the PROJECTS tab turns back to black.

    this happens in portfolio pages(pages that i create in ‘portfolio’ instead of ‘page’ and any child pages.
    i just want parent page menu items to remain highlighted in blue when child pages are selected…

    please help!
    thx in advance.

    #282438
    Bones_Jones
    Participant

    please help… it just seems so hard to work around the wordpress menu…

    #282549
    Bones_Jones
    Participant

    i did try something like

    li#menu-item-1573 {
    color: #32bff2;
    }

    but doesn’t work…

    #282553
    Shikkediel
    Participant

    This is the identifier used in the CSS for the color:

    .fusion-main-menu .fusion-widget-cart-counter > a::before, .fusion-main-menu > ul > li > a
    

    It might be important to target a itself instead of the parent.

    #282585
    Bones_Jones
    Participant

    thx.

    so i tried this
    .fusion-main-menu .fusion-widget-cart-counter > a::before, .fusion-main-menu > ul > li > a {color:#27c4ea;}

    but it turns everything blue though. what did i do wrong?

    #282615
    Shikkediel
    Participant

    I was just referring to the general rule in the stylesheet, you would only need the last identifier to target the menu links. And if you want to change that single particular link, then you could just add a to what you already came up with:

    #menu-item-1573 a {
    color: #32bff2;
    }
    
    #282626
    Bones_Jones
    Participant

    wow thank you! i totally forgot about the ‘a’! gosh i feel so stupid!! thank you again!

    #282630
    Bones_Jones
    Participant

    actually when i did that ‘PROJECTS’ stay blue on all pages… so i took it down…

    is there anyway to make it blue just on these project pages?

    #282635
    Bones_Jones
    Participant

    i did try

    #menu-item-1573 a:active {
    color: #32bff2;
    }

    but didn’t work…

    #282645
    Shikkediel
    Participant

    I’m not familiar with WordPress or the particular interface you’re using… I would somehow try to make the additional style only apply to the portfolio-items directory. I reckon it currently applies to all and any page that is loaded.

    #282705
    Bones_Jones
    Participant

    i think i figured it out. it had something to do with how i set up the menu. i had to put the portfolio category link instead of the page itself.

    thx for your help!

Viewing 11 posts - 1 through 11 (of 11 total)
  • The forum ‘CSS’ is closed to new topics and replies.