Site logo

[Resolved] Trying to create hook above primary navigation – how do I get rid of dead space?

Home Forums Support [Resolved] Trying to create hook above primary navigation – how do I get rid of dead space?

Home Forums Support Trying to create hook above primary navigation – how do I get rid of dead space?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2049057
    Alexander

    Hey there. I’m playing around with hooks and elements to create a landing page. One of the things I want to do is a to make a top bar with invitation to join my mailing list, similar to this page: https://libbykirschbooks.com/

    Trying it out here: https://www.ajnorfield.com/home/ but as you can see there’s a black bar between the hook and the navigation. I can’t figure out how to get rid of that hook…

    #2049091
    David
    Staff
    Customer Support

    Hi there,

    The H6 element has 20px bottom margin attached to it.

    If you want HTML then i suggest you add a container with some classes for styling eg.

    <h6>Some text here</h6>

    then you can add some CSS eg.

    .custom-top-bar {
        background-color:#3b6884;
    }
    
    .custom-top-bar h6 {
        margin-bottom: 0;
    }

    Alternatively use a Block Element with the GenerateBlocks plugin – you can build and style directly in the editor then 🙂

    #2062655
    Alexander

    I tried this but it does not seem to stick/do anything. is custom-top-bar the correct call for it when I use the hook functionality? Should I use a different text version instead of H6? OR approach this entirely different?

    I’ve not managed to make it work with block element either.

    #2063100
    Ying
    Staff
    Customer Support

    Hi Alexander,

    What David meant was to add something like a <div> to wrap the<h6>.

    So the content you add to the hook would be:
    <div class="custom-top-bar"><h6>Get a Free Ebook</h6></div>

    Then the CSS David provided should work:

    .custom-top-bar {
        background-color:#3b6884;
        text-align: center;
    }
    .custom-top-bar h6 {
        margin-bottom: 0;
    }

    Let me know if this helps 🙂

    #2098874
    Alexander

    That worked, thank you very much! Still learning a lot about these class tags and how they respond to different things like calling up a pop-up or custom CSS like this.

    Issue marked as resolved. 🙂

    #2100430
    Ying
    Staff
    Customer Support

    You are welcome 🙂

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