Site logo

Archived topic

Secondary Menu Social Icons aligned on the right

9 replies · Started by Atmostfear on March 4, 2021

Viewing posts 1–10 of 10

Hello,

We recently switched our theme to GeneratePress and the only issue we have, for now, is how to set the social icons on the right of the secondary menu, or top bar, using only CSS for this.

Our website: https://www.atmostfear-entertainment.com/

Any assistance will be more than welcome.

Hello Ying,

It seems the solution is more for mobile, we are aiming at the top bar, right side, on desktop, using FontAwesome as we have a PRO subscription.

We are using Flexbox, if it helps.

The method works no matter it's mobile or desktop. You just need to add the icon in to secondary navigation just like you adding the other menu items before.

Have you tried yet?

Hello there,

Our reply will be negative. Our aim is to keep the menu aligned on the left, and our social icons on the right.

Please advise.

Can you link us to the GP site in question with the social icon already added in?

Try this:

- Remove the menu-item-float-right class you've added to all the icons Except the first icon which is the Github icon currently.

- Add this CSS:

@media (min-width: 769px) {
    .secondary-navigation .main-nav {
        display: flex;
        flex: 1;
    }
    .secondary-navigation .main-nav>ul {
        flex: 1;
    }
    .secondary-navigation li.menu-item-float-right {
        margin-left: auto;
    }
}

Thank you Leo, this worked for us.

No problem :)

This archived topic is closed to new replies.