Site logo

Archived topic

center align > elements inside the main navigation

3 replies · Started by anabella on May 29, 2020

Viewing posts 1–4 of 4

Hi,

I want the elements inside my main navigation to be center-aligned.

Initially, I added some top padding in order to "push them down", but then I transformed one of the li into a button (by adding some css), so the manual padding that I had added initially didn´t look quite right anymore, so I just deleted it.

How can I make them aligned (centre-aligned and all at the same level)?

Thanks!

Hi there,

try adding this CSS:

@media (min-width: 769px) {
    .main-navigation ul {
        display: flex;
        align-items: center;
    }
}

@media (min-width: 1200px) {
    .inside-header {
        display: flex;
        align-items: center;
    }
}

Thank you so much David! It looks great now :)

You're welcome

This archived topic is closed to new replies.