skip to Main Content

Can you help me center the dropdown menu from the parent menu please, I was using Elementor in wordpress. I tried this css code but it does nothing:

.header-menu {
     left: 50%;
     right: auto;
     text-align: center;
     transform: translate(-50%, 0);
 }

https://i.stack.imgur.com/r9LQd.jpg

Screenshot of the inspect

2

Answers


  1. Quoting from here:

    Add a custom CSS class name to your Elementor menu ex: full_center_dropdown

    .full_center_dropdown nav ul {
        min-width: 100% !important;
    }
    .full_center_dropdown nav ul a {
       justify-content: center;
    }
    
    Login or Signup to reply.
  2. This works for me:

    1. In the Nav Menu add the following CSS:

      .elementor-nav-menu–dropdown > ul
      {
      text-align: center!important;
      }

    2. In the Edit Nav Menu first tab (Content) under disposition > Mobile Dropdown > select: Align = "Center"

    And that’s it!

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search