• Resolved stefang2002

    (@stefang2002)


    Hello,

    I want to reduce the height of the grey main menu, when scrolling down. Also my logo is bigger than standard (300×41 px).

    How can I change the height of the grey bar, but logo and menu should stay in the middle (vertically)?

Viewing 9 replies - 1 through 9 (of 9 total)
  • @stefang2002

    What’s your site’s URL?

    ivegte

    (@ivegte)

    To change the height of the main navigation menu, you can in the css file for this:

    .top-bar {
    	position: relative;
    	z-index: 99999;
    	background-color: #222;
    	opacity: 0.9;
    }

    You can set the height using ‘height: 350px;’ I’ve put 350px here just for an example.

    ivegte

    (@ivegte)

    Sorry, I just noticed that putting just a ‘height’ will make your website looks bad :). Too bad I cannot delete my comment.

    Thread Starter stefang2002

    (@stefang2002)

    @jan Cavan Boulas
    My homepage is not online yet.

    @ivegte
    Thanks for the hint, but I already tried that without success. It is possible to change the height with your css sample, but then the menu and the logo are not vertically in the middle of the grey stripe.

    vladff

    (@vladff)

    Use this in a custom CSS plugin or child theme:

    .main-navigation li,
    .site-branding {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    Those are the default values, check them as you need.

    Thread Starter stefang2002

    (@stefang2002)

    Thanks vladff! It tried this in a custom css plugin and it only worked for the first menu when scrolling between the main picture and the content. But when scrolling within the content it stays default.

    I attached a picture: https://img5.fotos-hochladen.net/uploads/moesiascreenshy4n7blsj0e.jpg
    How can I change this height?

    vladff

    (@vladff)

    You can use this and adjust it as you need:

    .stuck .main-navigation li,
    .stuck .site-branding {
        padding-top: 20px;
        padding-bottom: 20px;
    }

    Thread Starter stefang2002

    (@stefang2002)

    Many thanks, vladff!

    Timpah

    (@timpah)

    vladff, you are a Hero! Thanks

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Height of Menu’ is closed to new replies.