[Resolved] Logo + 2 widgets

Home Forums Support [Resolved] Logo + 2 widgets

Home Forums Support Logo + 2 widgets

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #813985
    Paul

    Hi,

    Is there a tutorial at all for creating a header like this: https://learnosity.com/

    thanks

    #814048
    Leo
    Staff
    Customer Support

    Hi there,

    I would recommend using this method:
    https://docs.generatepress.com/article/navigation-as-a-header/

    You can use menu-item-float-right class to move certain items to the right:
    https://docs.generatepress.com/article/adding-icons-to-menu-items/#floating-the-icon-to-the-right

    This should help for buttons:
    https://docs.generatepress.com/article/adding-buttons-navigation/

    Shouldn’t need any widgets ๐Ÿ™‚

    #814308
    Paul

    Thanks Leo but that doesn’t really work.
    I’m fine with buttons it’s getting the menu to sit next to the logo i’m struggling with.

    #814428
    David
    Staff
    Customer Support

    Hi there,

    could you share a link to your Site? You can edit your original topic and use the Site URL field for privacy.

    #814473
    Paul

    It’s not online right now but I’ve updated the OP with a link to a demo site that has the same header layout.

    #814753
    David
    Staff
    Customer Support

    So you would need to set the Nav as the header as per Leo’s instructions.
    Then add this CSS:

    @media (min-width: 768px) {
        .main-navigation ul {
            display: flex;
        }
        .main-navigation li.force-right {
            margin-left: auto;
        }
    }

    The first menu item you want sitting to the right ( e.g in the Learnosity site the Pricing item ) needs a CSS Class of force-right

    This will keep it and any subsequent menu items and the nav search to the right and all others will be pushed over to the left.

    #814771
    Paul

    That’s absolutely perfect David, thank you.
    And thank you Leo for the initial info.

    I’ll be using this alot now.

    I’d also like in future to create a similar layout but with the main nav centered, with a contact button to the right. So similar to this one you’ve helped me with but nav central instead of next to the logo. Would that be the same code but replacing “flex” in the css?

    Once I have that figured out, with all the built in options and starter sites I think i’ve got every header layout I could ever need.

    I love GP.

    #814775
    David
    Staff
    Customer Support

    Awesome ๐Ÿ™‚
    So using that above code you should be able to apply the same force-right class to the first menu item.

    #814802
    Paul

    Works perfectly, thanks very much.

    #814813
    David
    Staff
    Customer Support

    Glad to be of help.

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