Site logo

Archived topic

Align menu by height

8 replies · Started by Oleg on February 16, 2016

Viewing posts 1–9 of 9

Hello!
By default, the menu is displayed as:

1

I want it to be so:

2

That is, I want to align the menu in the middle. What CSS is needed?

Couple options:

a) Increase the height of your menu items in "Customize > Element Spacing".
b) Add this CSS:

.nav-float-right .main-navigation {
    margin-top: 15px;
}

Adjust the px as needed :)

Thank you! And how to set border radius in the background when you hover the link?

1

This should do it:

.main-navigation .main-nav > ul > li > a:hover {
    border-radius: 10px;
}

Tom,
As I hover cursor shows that the border were straight. I made the video:

Video screenshot

Ah, there's a slight transition happening from straight to curved.

You can apply the curve to the element at all times since it's white on white anyways, and it should remove the transition:

.main-navigation .main-nav > ul > li > a {
    border-radius: 10px;
}

Super!

I lined the menu on the left side. However, I think that the menu has to be indented, as in other content (eg, 40 pixels). At the same indentation settings should remain the same (eg, 10 pixels). How to achieve this?

1

You could do that with this CSS:

.inside-navigation {
    margin-left: 40px;
    margin-right: 40px;
}

Then if you want to indent the color of the navigation bar as well, you'll need to do this:

.main-navigation {
     background: #FFFFFF;
}

.inside-navigation {
    background: #222222;
}
This archived topic is closed to new replies.