skip to Main Content

I am trying to apply custom styling on my navigation menu in wordpress but when i assign a css class in appearance -> menus and style the class that i have assigned to the menu link no changes happen. I am trying to apply display: none to menu item and it shows the class and styling when the element is inspected but i dont know why it does not overwrite, replace and work. Theme i am using is Divi.

screenshot css definition

screenshot css definition

Thank you for any suggestions.

2

Answers


  1. add parent class for menu-segment-frezovanie like below.

    body #top-menu li.mega-menu ul li.menu-segment-frezovanie{
        display:none !important;
    }
    
    Login or Signup to reply.
  2. As the precedence of id # is higher then the class . so you need to target with id as its previously targeted like

    #top-menu li.mega-menu ul li.menu-segment-frezovanie{
      display: none !important;
    }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search