Archived topic
Split Menu
17 replies · Started by Simone on September 10, 2021
Hi
I would like to have a slip menu with the logo in the middle. How can I do?
Thank you!
Hi there,
this document explains how:
https://docs.generatepress.com/article/centering-logo-navigation/
Hi David,
I did exactly what's written on the documentation, and here is the result: https://zennailsbar.co.il/
Needs a little adjustment for LTR site. Change this part of the CSS:
#site-navigation {
margin-left: unset !important;
display: flex;
}
to:
#site-navigation {
margin-left: unset !important;
display: flex;
justify-content: center;
}
Thank you, David but it doesn't change anything. What else can I do?
It doesn't look like you've made the change David specified:
https://www.screencast.com/t/3nv0DCsUr
It works when I try using the inspector tool:
https://www.screencast.com/t/HyCGEO84gz1
Hi Leo, what you are showing me is not the same code David sent me. I'll try to find it in the CCS
It is the exact same code just without the media query.
That's only code I've found https://www.screencast.com/t/dr5XYfeFHmY
Looks like it's right below it:
https://www.screencast.com/t/Xghe7PfhM
Hi again, I've passed the code instead of the previous one and it still doesn't change anything. The header remains the same:https://zennailsbar.co.il/
Hi there,
The logo seems centered on my end (on desktop) - https://share.getcloudapp.com/qGuJ6wDL
Are you pertaining to the one on the mobile view? Are you trying to make it look like this?
https://share.getcloudapp.com/RBuLJ1vX
If yes, try this CSS:
@media (max-width:768px){
nav#mobile-menu-control-wrapper {
width: 100%;
display: flex;
justify-content: space-between;
}
nav#mobile-menu-control-wrapper button.menu-toggle {
width: fit-content !important;
display: inline-block !important;
flex: 0 0 auto;
}
.site-logo {
position: absolute;
left: 50%;
transform: translate(-50%, 0);
z-index: 99999;
}
}
Hi Elvin,
Yes, the logo is centered, but as you can see the menu goes on the left side. I want it to be nearer to the logo, like the menu on the right side.
Hi Simone,
I don't see Elvin's code in his last reply has been added to your site yet.
And I'm not sure I fully understand your last reply.
I want it to be nearer to the logo, like the menu on the right side.
If you use Elvin's code, the distance between menu toggle/search icon and logo should be exactly the same. If you can send us a markup, it would be helpful :)
Hi Ying,
I meant the menu on the left side is too far from the logo. In other words, it's not centered.
However, should I replace the whole code with the one Elvine sent me?