Site logo

Archived topic

secondary navigation right and left items

5 replies · Started by Daniele on September 23, 2020

Viewing posts 1–6 of 6

Hello,
I would like to show some items on the left and other on the right in my secondary navigation.

There's any css that does the trick?

thanks

Hi there,

can you provide a link to your site so i can see the layout and what CSS would be required.

Here it is:

Try this:

.secondary-navigation ul {
    display: flex;
    /* Optional width setting */
    max-width: 1240px;
    margin: auto !important;
}
.secondary-navigation ul li:nth-child(2) {
    margin-left: auto;
}

I have added an optional width settings if you need them - this will contain the nav to the width of the content.

This part of the CSS: nth-child(2) defines which menu items you want on the right.
So in this example that would item 2 and 3.
If you wanted to just move the 3rd item ( and any new items after it ( to the right your would change it to: nth-child(3)

Thanks David,
perfectly suit my needs

You're welcome

This archived topic is closed to new replies.