Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Space Before Heading

  • Hi there,

    is it possible to define a space before the heading? I could only find space after heading or after a paragraph.

    As you can see on this screenshot, I would need a few more lines before the next H2, H3, H4 etc. starts.

    Thanks for your help in advance!

  • Hi there,

    Yes, you can use CSS to do so.

    .site-main :is(h2,h3,h4) {
        margin-top:20px;
    }
  • Thanks Ying,

    I added the code to my additional css-code.
    Nothing seems to happen afterwards. I set it to 150px, but still….no changes.

    Should it be rather

    .site-main :is(h2,h3,h4) {
        margin-top:20px;
    }

    ?
    And is it responsible, so that it works on Mobile and Tablet also?
    What css code would I have to use if I wanted to individualize the values for desktop, tablet and mobile?

  • Can I see your site?

    The CSS should work for all devices.

  • Yes, you can see it.

    I added it to the private info box.

  • The page you linked only has 1 h3, there’s no h2, or h4, and the CSS is working:
    https://app.screencast.com/SsKFbRMLbIPBE

    If you want to define a different value for mobile, you can add this:

    @media(max-width: 768px) { 
     .site-main :is(h2,h3,h4) {
        margin-top:10px;
    }
    }
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.