Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1484355

    Is it possible to style each of the three burger menu levels independently? (I am viewing on an iPhone)

    Right now any of my 2nd level (sub-menu) styling is also applied to 3rd (sub sub-menu) ..which I don’t want.

    If I have to target very specific text then I am ok with that.

    Thanks!

    #1484370

    Hey jkos,

    Could you share a screenshot highlighting what you would like to achieve please?

    Best regards,
    Rikard

    #1484384

    Hi Rikard,

    I would like to be able to style the Blue zone, Green zone & Orange zone independently. As you can see in the picture my blue & bold to the Green zone is also affecting the Orange zone. (I have since removed that styling)

    In finer detail is it possible to style one specific line within one specific zone. Notice the thin pink zones. “Land Speak of the John Muir Trail” in the Green zone may need slightly different styling than “Giants in the Gulch” which is also in the Green zone. Also, “Land Speak of the JMT – Statement” in the Orange zone could use slightly different styling than any of the other lines in the Orange zone.

    The site is technically live but, unsearchable, the URL is not published anywhere and no one knows of the site. Feel free to tinker at will. lol

    Thank you for your time!
    Jason

    #1484386

    Hi,
    Since you want different styles for each menu item even if they are in the same zones as other items

    “Land Speak of the John Muir Trail” in the Green zone may need slightly different styling than “Giants in the Gulch” which is also in the Green zone. Also, “Land Speak of the JMT – Statement” in the Orange zone could use slightly different styling than any of the other lines in the Orange zone.

    your best approach will be to add custom classes to each menu item to target them with specific css.
    Go to your menu screen and click the drop down “screen options” and check the box “CSS classes”
    Screen Shot 2025 05 17 at 1.53.51 PM
    then you will see this box in the menu items
    Screen Shot 2025 05 17 at 1.55.31 PM
    For example, adding the custom class “green” and this css to your Quick CSS:

    #av-burger-menu-ul .green a {
    	color: green !important;
    }

    will make your burger menu item green.
    You can add multiple custom classes, for example if you want some items bold, you can also add the class “bold”:
    Screen Shot 2025 05 17 at 2.10.22 PM
    and this css:

    #av-burger-menu-ul .bold a {
    	font-weight: bolder !important;
    }

    then this item will be green and bold.

    Best regards,
    Mike

    #1484389

    Thanks Mike! I like where this is going but, doesn’t seem to be working just yet.
    I don’t see a change in the Customizing preview. I don’t see a change when I publish, delete cache, refresh page on iPhone.

    In the menus page I have given item Erosion Stories of Paria Canyon the custom CSS class = gal

    This is the CSS entered:

    #av-burger-menu-ul .gal a {
    color: blue !important;
    }
    I have also tried:
    #top #wrap_all #header #av-burger-menu-ul .gal a {
    color: blue !important;
    }

    Something is a miss. lol

    #1484399

    Hi,
    Unfortunately, I found that the mega menu column titles do not add the menu-item classes or the custom classes like the regular menu items
    Screen Shot 2025 05 18 at 7.38.36 AM
    Screen Shot 2025 05 18 at 7.41.32 AM
    After much research, I found no way to correct this, but I was able to add a unique custom class to each mega menu column title in your burger menu with this javascript:

    document.addEventListener('DOMContentLoaded', function () {
      const burger = document.querySelector('.av-burger-menu-main');
      let columnClassAdded = false;
    
      if (burger) {
        burger.addEventListener('click', function () {
         
          setTimeout(() => {
            if (columnClassAdded) return;
    
            const columnTitles = document.querySelectorAll('#av-burger-menu-ul li.av-width-submenu');
    
            columnTitles.forEach((el, index) => {
              el.classList.add('menu-column-title-' + (index + 1));
            });
    
            columnClassAdded = true;
          }, 100);
        });
      }
    });
    

    I added this to your WP Code plugin as a javascript snippet, it adds:
    menu-column-title-1 with the number changing for each title, since you currently have six of them it goes to menu-column-title-6
    with menu-column-title-1 = Collections and menu-column-title-6 = Being Seen.
    The css to make Erosion Stories of Paria Canyon blue I added this:

    #av-burger-menu-ul .menu-column-title-2 > a {
    	color: blue !important;
    }
    

    Screen Shot 2025 05 18 at 7.53.37 AM
    So using this structure you can style the mega menu column titles in the burger menu, and for the other menu items use the custom classes as above, note that you will need to add a greater-than symbol in your css, like this:

    #av-burger-menu-ul .gal > a {
    color: blue !important;
    }

    so the siblings also don’t change.
    Give this a try and let us know if you find any other issues.

    Best regards,
    Mike

    #1484412

    It works!! You’re amazing!! I have already been able to do my stylings using both the .menu-column-title-# and the custom CSS class.

    Thank you so much for your time, effort and knowhow.
    Jason

    #1484415

    Hi,
    Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Burger sub-menu’ is closed to new replies.