• Resolved tchen200

    (@tchen200)


    When I change the height of the navigation bar like
    .main-navigation {
    height: 30px;
    }

    the bar does decrease, however the location of the menu text isn’t centered in the middle (height-wise).

    How would I fix this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter tchen200

    (@tchen200)

    Oh, instead of changing the height, I changed the line-height and it worked.

    Hi there,

    I’m glad you were able to find a solution!

    Another way to decrease the height of the menu is to decrease the top and bottom padding for each menu item with the following custom CSS:

    @media screen and (min-width: 768px) {
        .main-navigation ul li {
            padding-top: .5em;
            padding-bottom: .5em;
        }
    }

    You can increase/decrease the values of padding-top and padding-bottom in the above snippet to your liking. Increments/decrements of .1 are enough to have an impact e.g. .4, .3, etc.

    In case you’re not already aware: You should not edit your theme’s files directly. Any changes you make there will be lost when it comes time to update.

    To add custom CSS: Firstly set up a child theme or activate a custom CSS plugin. (If you have Jetpack installed then you can activate its custom CSS module.)

    Hope that information’s helpful! We’re right here if extra questions come up.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Changing the height of the navigation bar’ is closed to new replies.