Jump to content

Center the main menu under "displayNavFullWidth" [SOLVED]


Kreykoui

Recommended Posts

Hello everyone,

In order to find space, I try to integrate the main menu of my site in production, with the hook "displayNavFullWidth".

But as you can see, the menu remains sticking to the left margin. I tried different possibilities found on the web but none seem to work under version 1.7.8.7.

Is there a solution to center the menu so that it is compatible with different screen formats?

Thank you for any help you can give me.

106615989_Menudcentr.thumb.jpg.71b6dcc1f2a2991351b33312b3d10220.jpg

Link to comment
Share on other sites

Le 2022-08-19 à 7:41 AM, stifler97 a dit :

i think this is missing a container class. because it seems to be wider than normal

That's also the impression I had but, not being a programmer...

Your intervention gave me the courage to dive in and after careful consideration, I took the plunge!

So instead of "building" a container to drop "displayNavFullWidth" hook into it, I decided to use the already existing container in: /mysite/themes/classic/templates/_partials/header.tpl, and just move {hook h='displayNavFullWidth'} in the right place.

Simple clean handling that responds well on all screen formats.

Magic Magic !!

Solution Menu Pleine Largeur.jpg

  • Like 1
Link to comment
Share on other sites

  • Kreykoui changed the title to Center the main menu under "displayNavFullWidth" [SOLVED]

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...