Viewing 25 posts - 1 through 25 (of 25 total)
  • Author
    Posts
  • #1000327

    Hi,

    In a menu I’m creating I want to have the active menu item bold. When I do this using .current-menu-item span.avia-menu-text or .av-main-nav .current_page_item a > .avia-menu-text it works perfectly. But: all the sub-menu items under that active menu item are also bold. Two questions:

    – How can I prevent this, so when the main menu URL is active, only the main menu link is bold?
    – If a submenu item is active, how can I make that submenu item plus the main menu item bold?

    Thanks!

    #1000600

    Hey Daniel,

    Could you post a link to where we can see the elements in question so that we can take a closer look please?

    Best regards,
    Rikard

    #1000607

    Oh sorry, I forgot! It’s in the private section.

    #1000666

    Hi,

    Thanks for that. Please try this CSS as well, below your other CSS you referred to in your initial post:

    .current-menu-item .sub-menu span.avia-menu-text {
      font-weight:500 !important;
    }

    Best regards,
    Rikard

    #1000678

    Hi Rikard,

    This works great when the main menu link it the active page, thanks. But when the submenu item is the active page, it is not bold, nor is the main menu item. So this question remains:

    – If a submenu item is active, how can I make that submenu item plus the main menu item bold?

    Thanks!

    #1000986

    Hi Daniel,

    Try using this css code:

    #top #avia-menu .current-menu-item > a > .avia-menu-text {
        font-weight: 700 !important;
    }

    Let us know if this helps.

    Best regards,
    Nikko

    #1001060

    YES! Thank you @Nikko!

    #1001098

    Ah one last thing :) How can I make this work for the mobile menu?

    #1001215

    Hi Daniel,

    Here is the code you can put in Enfold > General Styling > Quick Css,  if it does not work, put into themes/enfold/css/custom.css

    
    #top #wrap_all .av-burger-overlay .av-burger-overlay-scroll #av-burger-menu-ul li a {
    	font-weight: 700;
    }
    

    If you need further assistance please let us know.

    Best regards,
    Victoria

    #1001622

    Hi Victoria,

    That css doesn’t mention any active menu item, so all items will have a font-weight: 700;. I tried several different options with the current-menu-item but no success yet. Can you help me?

    • This reply was modified 6 years, 1 month ago by Daniel.
    #1001912

    Hi Daniel,

    I thought you wanted to make all the items bolder.

    Here is the code you can put in Enfold > General Styling > Quick Css,  if it does not work, put into themes/enfold/css/custom.css

    
    @media only screen and (max-width: 767px) {
      #top #wrap_all #header #av-burger-menu-ul > li.av-active-burger-items.current-menu-item .sub-menu a {
        font-weight: 500;
      }
      #top #wrap_all #header #av-burger-menu-ul > li.av-active-burger-items.current-menu-item a {
        font-weight: 700;
      }
    }
    
    

    If you need further assistance please let us know.

    Best regards,
    Victoria

    #1002387

    Hi Victoria,

    Sorry for the confusion, I’m happy you understand me now :) We’re almost there, one last thing.
    – If a submenu item is active, how can I make that submenu item plus the main menu item bold?

    Thanks!

    #1002587

    Hi Daniel,

    I think you can do that by adding this code:

    #top #wrap_all #header #av-burger-menu-ul > li.current-menu-parent > a {
        font-weight: 700;
    }

    after this line in Victoria’s code:

    @media only screen and (max-width: 767px) {

    Hope this helps.

    Best regards,
    Nikko

    #1002592

    Hi Nikko,

    This code makes the parent bold when a child-menu item in the sub-menu is the current active page. It doesn’t make the child-menu item bold nor does it work for main menu items.

    Warm regards,
    Daniel

    #1002599

    allthough i do not see your page link : try this please:

    #av-burger-menu-ul :not(.active-parent-item) .current-menu-item > a .avia-menu-text {
        font-weight: 700 !important;
        color: red !important;
    }

    but now i’m looking for the soluiution if there was a top menu point
    to come:

    #1002606

    Hi Guenter,

    That’s it! Thanks so much!

    Regards,
    Daniel

    #1002607

    it is only the half solution !
    if there is a top level point this does not do the trick – i have to look deeper

    #1002609

    What do you mean by top level point?

    #1002610

    i meant: if you got a top level menu point which does not have submenu !

    the color: red is for me just to see it better on menu:

    #av-burger-menu-ul :not(.active-parent-item) .current-menu-item > a .avia-menu-text {
        font-weight: 700 ;
        color: red ;
    }
    
    #av-burger-menu-ul li.current-menu-item:not(.av-width-submenu) > a .avia-menu-text {
        font-weight: 700;
        color: red ;
    }

    guess it will work without !important

    #1002612

    Works here, without sub-menu items: http://up.daan.me/c0aefd79a1d0
    And also with sub-menu items: http://up.daan.me/566ed936bec7

    #1002614

    yes – if you like to have the parent bold too – than this will be easier.
    the code only highlites the active menu point ( not the parent of an active menu item)

    #1002618

    Hi Guenter,

    Thanks for your explanation. This was exactly what I was looking for however.

    #1002669

    Hi,

    Great, glad that @guenni007 could help you out. Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

    #1002676

    Hi Rikard,

    You can close the ticket.

    #1002861

    Hi,

    Glad we could help!

    Please take a moment to review our theme and show your support https://themeforest.net/downloads
    Don’t forget to bookmark Enfold Documentation for future reference.

    Thank you for using Enfold :)

    Best regards,
    Basilis

Viewing 25 posts - 1 through 25 (of 25 total)
  • The topic ‘Make active menu item bold, not all sub-menu items’ is closed to new replies.