Align menu by height

Home Forums Support Align menu by height

Home Forums Support Align menu by height

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #173025
    Oleg

    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?

    • This topic was modified 8 years, 8 months ago by Oleg.
    #173151
    Tom
    Lead Developer
    Lead Developer

    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 🙂

    #173259
    Oleg

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

    1

    #173265
    Tom
    Lead Developer
    Lead Developer

    This should do it:

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

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

    Video screenshot

    #173363
    Tom
    Lead Developer
    Lead Developer

    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;
    }
    #173396
    Oleg

    Super!

    #173564
    Oleg

    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

    #173635
    Tom
    Lead Developer
    Lead Developer

    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;
    }
Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.