[Support request] Question about container and space

Home Forums Support [Support request] Question about container and space

Home Forums Support Question about container and space

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #2261681
    Sonja

    Hello,

    sometimes I need a colored Box, where i put some text in.
    The I add a Container from GPB and click on the Plus Sign and add a praragrap where i put my text. Then i add background color to the container.
    Then i set internal spacing to 25 on all sides.

    But the result is always, that the space below the text is bigger then above the text. Why is that and how can i make, that it is the same space above and below?

    #2261685
    Leo
    Staff
    Customer Support

    Hi there,

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

    You can use the private information field:
    https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information

    Let me know 🙂

    #2261693
    Sonja

    yes, there is a grey box in the text where you can see it.

    #2261725
    Leo
    Staff
    Customer Support

    The extra space is the default bottom-margin added to the paragraph block:
    https://www.screencast.com/t/uAG9kNRZx

    Try using a headline block instead, then set the bottom margin to 0:
    https://docs.generateblocks.com/article/headline-overview/
    https://docs.generateblocks.com/article/headline-overview/#spacing

    Let me know if this helps 🙂

    #2261936
    Sonja

    But this is no headline. Just text.
    In the docs you mentioned, it says: This block isn’t intended to be used for full paragraphs of text.

    Also It would not be semantically correct to use a heading here.

    #2261942
    Fernando
    Customer Support

    Hi Sonja,

    You may set the Headline Block to be a Paragraph Block as well: https://share.getcloudapp.com/eDuXjYyl

    In this case, you may add long blocks of text.

    Alternatively, if you wish to use WP Paragraph Blocks, you can add this CSS in Appearance > Customize > Additional CSS to remove the default bottom margin:

    p {
        margin-bottom: 0;
    }

    Hope this helps!

    #2262489
    Sonja

    Hi Fernando,

    okay, thanks, will try. But what do you mean with “In this case, you may add long blocks of text”?
    I usualy have only short text in such a box. Like 2 -3 sentences.

    #2262552
    Leo
    Staff
    Customer Support

    It just means that you can use a paragraph in a Headline block that’s all.

    I wouldn’t recommend using the CSS as Fernando suggested – it will remove all bottom margin for the <p> tag.

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