• Join the Best Wordpress and Elementor Support forum

    Provide or get advice on everything Elementor and Wordpress, ask questions, gain confirmation or just become apart of a friendly, like minded community who love Wordpress and Elementor


    Join us!

Help with Nav sub menu

N

NewMedia

New Member
I have nav menu set up in that one of the links has a submenu of the category pages within the link. For example, the link "Shop" in nav menu has this sub menu: category 1, category 2, category 3, etc.

There are several things I wanted to do with the sub menu.

1. When one is on Shop link, I want the submenu to automatically open and remain open when one is on the category pages under Shop. Therefore, I need to change the link from hover effect to toggle effect.

2. I'm trying to make the submenu horizontal. In order to do that, I need to change the display: block to display: flex. However, I was unable to do so. I tried adding a css class cuz I noticed that .highlighted appears as one hover over the link with submenu. However, it didn't work because the submenu has inline styles added.
Code:
.mb-primary-nav-menu .highlighted ul.sub-menu {    display: flex !important;    justify-content: center; }
Also, you can see how the code functions in the screenshots below, with hover and without hovering over the "Shop" link.
 

Attachments

  • Screen Shot 2021-04-23 at 11.38.36 AM.jpg
    Screen Shot 2021-04-23 at 11.38.36 AM.jpg
    163.6 KB · Views: 387
  • Screen Shot 2021-04-23 at 11.39.11 AM.jpg
    Screen Shot 2021-04-23 at 11.39.11 AM.jpg
    193.7 KB · Views: 394

Latest Resources

Other Elementor Resources

elementor official

Still stuck? Ask the forum

Post your question with a screenshot and a link if you can, and a member will usually reply within a day. Free to join, no sales pitch.

Create a free account
Top