Site logo

[Resolved] Menu on the top

Home Forums Support [Resolved] Menu on the top

Home Forums Support Menu on the top

Viewing 15 posts - 1 through 15 (of 21 total)
  • Author
    Posts
  • #2514821
    Jusung

    Hello.
    I added the reference link for the image I am trying to make.

    I want to put the menu on the top like the image.

    Can you give me a clue to appraoch this?

    First merging the header to put the banner image and How can I add menu like this?

    #2514885
    Fernando
    Customer Support

    Hi Jusung,

    Is this a Secondary menu or your Primary Menu?

    You can also build the through a Block Element – Hook. Hook it to after_header.

    Just place GB Buttons in a Container Block and give the Container a negative margin top value.

    #2514903
    Jusung

    Can you see the page now?
    I merged the header and made an elements block(after header)
    For the button, I gave class and give negative margin but it didn’t work.

    the 50% of the button needs to be raised

    #2514915
    Fernando
    Customer Support

    How did you add the negative margin?

    Can you add it through the spacing settings?: https://docs.generateblocks.com/article/container-overview/#spacing

    #2514924
    Jusung

    I added class to the button and on the addtional CSS, I added it, but nothing happened. so I deleted it.

    #2514927
    Fernando
    Customer Support

    Can you add it through the Container Block settings as mentioned? Let us know how it goes.

    #2515002
    Jusung

    It works. When the screen is reduced the size of menu should be redueced too.
    Do I need to set the padding of buttons seperately?
    like on mobile, on table, on PC?

    #2515007
    Jusung

    I gave the padding of buttons as %, which works.

    However, the location of parent button is not static..

    #2515032
    Fernando
    Customer Support

    Yes, you can set different Paddings for different views. That should work. Using % works too.

    Can you expound a bit more on what this means “the location of parent button is not static..”?

    #2515109
    Jusung

    the negative margin. it is not static when the size of screen changes.
    I want to make it static, but when I give % padding, it is not static.

    for example, I wanna put the menu in the center exactly always.

    #2515111
    Fernando
    Customer Support

    I see. Can you add the Container Block for the menu inside to Container Block for the Header?

    We can do it through custom CSS to position it exactly at 50% horizontally.

    #2515117
    Jusung

    I think I have added it, but the page is broken now.

    #2515123
    Fernando
    Customer Support

    Try adding this through Appearance > Customize > Additional CSS:

    .gb-container.gb-container-72c0591f {
        position: absolute;
        left: 50%;
        bottom: 0px;
        transform: translate(-50%, 50%);
        width: 100%;
    }
    
    .gb-container.gb-container-72c0591f .gb-button-wrapper-2d692b58 {
        display: flex;
        flex-wrap: wrap;
    }
    
    .gb-container.gb-container-763eec58 > .gb-inside-container {
        position: static;
    }
    
    .gb-container.gb-container-763eec58 {
        position: relative;
    }
    #2515307
    Jusung

    It works. but I have no idea how I can adjust the size of button.
    I gave padding as % So, the size of button can be reduced when the screen size is reduced.
    But giving padding doesn’t work..

    #2515424
    Jusung

    I give button a class (test1) and
    I set this.

    .test1 {
    padding:15% 30% 15% 30%;
    }

    @media
    (max-width: 1024px) {
    .test1 {
    padding:10% 15% 10% 15%;
    }
    }

    @media
    (max-width: 769px) {
    .test1 {
    padding:7% 9% 7% 9%;
    }
    }

    Is there other way to make this?

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