Archived topic
Vertical alignment of the menu
7 replies · Started by Raul on January 19, 2021
Hi
My logo is in the left, the primary navigation (menu) in the right side and they are both vertical aligned in the middle. This is correct and it was supposed to look good. The problem is that my logo is a bit different and that's why I would need the menu to not be aligned in the middle but in the bottom.
How could I set the vertical alignment of the menu?
Thank you!
Hi there,
can you share a link to your site where i can see the layout ?
Here is the website: https://yeclar.ro/
It's under construction now.
Try this CSS:
@media(min-width: 769px) {
.main-navigation .inside-navigation .main-nav>ul li a {
line-height: 1em;
padding-top: 50px;
padding-bottom: 12px;
}
}
So what its doing - the line-height of your menu items is set to 80px.
This CSS overwrites that height, first our new line-height 1em which is 18px ( the menu font size ), and then we just top and bottom padding to make up the difference in height ie. 18px + 50px + 12px = 80px.
Adjust the top and bottom padding to adjust the menu text vertical position.
Thank you very much! That works. Could you please be so kind and give me the CSS line for the sticky header too?
Updated the CSS above - it will apply to the normal and sticky nav now.
Thank you very much. Fantastic theme and support!
Glad to be of help!