• I’ve noticed that when I add a Buttons block, the CSS is kind of messed up and leaves a space at the top but not at the bottom of the button. Curious why this is the default for GeneratePress? Is there a simple fix or something I’m missing?

    • This topic was modified 2 years, 6 months ago by loudfan.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Leo

    (@leohsiang)

    Hi there,

    Any chance you can link us to the page in question?

    Let me know 🙂

    Thread Starter loudfan

    (@loudfan)

    I linked to a screenshot in the original post, but now I’ve substituted a link to the page. I had to put spacers in underneath the buttons, which is what I’ve consistently done. (I develop websites for authors, so I use a LOT of buttons… I finally got tired of wondering why I always have to put spacers underneath them!!)

    ying

    (@yingscarlett)

    Hi there,

    The space you are seeing above the buttons is from the paragraphs above the buttons, as the paragraphs have a default margin-bottom set to 1.5em.

    Thread Starter loudfan

    (@loudfan)

    What about the (lack of) space below the buttons?

    ying

    (@yingscarlett)

    The button itself does not have any spacing around it as WP sets its margin to 0. GP theme does not add any spacing to it as well, would you like to add spacing to it? If so, you can try this CSS. The CSS includes both top and bottom margin, you can remove the margin-top if the paragraph margin works for you.

    .wp-block-buttons>.wp-block-button {
        margin-top: 20px;
        margin-bottom: 20px;
    }
Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Weird button CSS’ is closed to new replies.