Archived topic
Logo centered in all languages
9 replies · Started by Leonardo on December 3, 2018
Hello,
I have a site with logo in the center of top bar and 4 languages. The problem is that: when I select other language (Italian is the main language), the logo is not perfectly in the middle of the top bar. I insert the URL of this site in the special form.
Thank and have a good Monday!
Hi there,
maybe you want to try out the GP Site Library - the Split site on there does this :)
Ah ok, I didn't know... If I import this site library, the rest of my site remain the same? Can I import only the menù?
No you can't import only the menu. You can follow the steps here though:
https://docs.generatepress.com/article/centering-logo-navigation/
Thank you for this answer, but it's very complicated for me change the original CSS code. Actually, the site for me it's perfect but the only problem is: how can I fixed the central logo (in the middle as in the original Italian language) when change the language and the length of the other menu items?
This is the CSS code used to put the logo in the center, found in your topic:
.site-header {
display: none;
}
.main-navigation li {
vertical-align: middle;
}
.main-navigation .main-nav ul li.centered-navigation-logo a {
padding: 20;
line-height: 0;
margin: 0 0px;
margin-bottom: 20px;
}
.main-navigation .main-nav ul li.centered-navigation-logo a:hover,
.main-navigation .main-nav ul li.centered-navigation-logo a:focus {
background: transparent;
}
.slideout-navigation .centered-navigation-logo,
.main-navigation.toggled .centered-navigation-logo {
display: none;
}
I repeat that for me it's perfect and the only problem is that the logo move on the left (or right) when I change the language and the length oh the items, compared to the Italian. The gap is evident in the Dutch language, but there is the same problem also with German and English.
Thank a lot!
That problem isn't avoidable unless you use the updated instructions Leo linked to.
The method you're using is the old method we suggested, but it doesn't "true center" the logo - the length of the items on either side can push it around.
The solution Leo linked to will "true center" your logo, regardless of the menu items.
Now the logo is fixed if I change the language, but the others items is not simmetric in any languages. Why? :(
What do you mean it's not symmetric?
I chose a couple language and they all look good to me.
Is there a specific language you are referring to?
Let me know :)
Sorry, Now it's perfect!
Thank you so much for your customare care! :)
Leonardo
No problem :)