[Resolved] Secondary nav menu item float

Home Forums Support [Resolved] Secondary nav menu item float

Home Forums Support Secondary nav menu item float

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #238237
    Jamal

    Hi

    I’m using secondary nav for the first time and i’m having a hard time keeping the menu-item-float-right to work on mobile.

    From “Appearance > Menus” i added a custom link to the secondary navigation with the above css class added, then i put some code in my functions.php to add a “login/logout” and “register” to my secondary nav. On desktop the custom link is as i want it on the right of the login/logout but on mobile the css below is overriding it

    @media (max-width: 768px)
    .sf-menu>li.menu-item-float-right {
        float: none!important;
    }

    Secondary nav itself is set to above header and aligned right. I have also prevented it from going into mobile mode with a code i got from this forum. Thanks in advance

    #238392
    Tom
    Lead Developer
    Lead Developer

    You’d just need to overwrite that CSS:

    @media (max-width: 768px) {
        .sf-menu>li.menu-item-float-right {
            float: right !important;
        }
    }
    #238431
    Jamal

    I swear i tried that in the morning but it didnt seem to work. Its working now, Thanks !

    #238486
    Tom
    Lead Developer
    Lead Developer

    You’re welcome 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.