Site logo

Archived topic

Adding Top Margin to Centered Logo

2 replies · Started by Ben on December 8, 2022

Viewing posts 1–3 of 3

Hey guys,

I've created a nav menu with a centered logo using the following code you provided in the the documentation:

@media(min-width: 769px) {
    .inside-header>.site-branding,
    .inside-header>.navigation-branding,
    .inside-header>.site-logo,
    .site-branding-container,
    #site-navigation .navigation-branding .site-logo,
    #sticky-navigation .navigation-branding {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1000;
    }

    #site-navigation {
        margin-left: unset !important;
        display: flex;
    }

    .site-header .main-navigation:not(#sticky-navigation) .inside-navigation {
        margin: unset;
    }

    #site-navigation,
    #primary-menu,
    .main-navigation .inside-navigation {
        flex: 1;
    }

    /* Change nth-child(#) to first item to right */
    .main-navigation ul li:nth-child(3) {
        margin-left: auto;
    }
}

However, I need to drop the logo lower. So where would I add the top margin?

https://bendoyle.me/

Thanks

I've fixed this!

Glad to hear that!

This archived topic is closed to new replies.