Theme4Press Forums alora Center menu with Header #4 Reply To: Center menu with Header #4

Denzel Chia
Post count: 3230
#20271 |


Yes, when you update Alora, the fix will not stay.
You will need to modify it again.

Yes, we cannot do this using custom css.
In CSS, if you want to center a div, in this case a nav, you need to enter the width and margin. For example, something like this,

But in this case, if you use a width, it will be fixed.
When you add a new item to menu, the width of the nav will not be the same, and you will need to adjust the custom css width value again.

In previous experience, using custom css does not center the menu properly.

In the case of header-v5, actually there is javascript within the theme to automatically grab values to position the menu in the center of the webpage.

Modifying the class name is easier that modifying the javascript or custom css.
In any case, you will need to modify, changing only the class name header-v4 to header-v5 is the easiest way to maintain.