[Support request] Adding Margin Top-Bottom to LAYOUT ELEMENTS

Home Forums Support [Support request] Adding Margin Top-Bottom to LAYOUT ELEMENTS

Home Forums Support Adding Margin Top-Bottom to LAYOUT ELEMENTS

  • This topic has 3 replies, 2 voices, and was last updated 1 month ago by Elvin.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2055187
    John

    Hello again!

    How can I add margin top/bottom above/below the entry content of a LAYOUT ELEMENT?
    I only want it for specific pages which have that layout.

    For example:
    https://wordpress-681983-2245781.cloudwaysapps.com/anxiety-fatigue-the-trump-years-and-finding-resilience-in-your-body/
    This page needs margin/padding above the Title.
    Also the same at the bottom of the content.

    I do not want to apply CSS to the whole site as it messes with the design of the other pages.
    Is it possible to give a LAYOUT ELEMENT a custom class or soemthign like that?

    Many thanks!

    #2055196
    Elvin
    Staff
    Customer Support

    Hi John,

    I’m not sure I understood what you mean.

    Layout Elements don’t add/create contents as it can only change the layout of a page.

    If you want a conditional CSS that matches the same condition as the Layout Element, you can create a Hook element containing the CSS styles you want for it and just copy the Display rule of the Layout element.

    Example: adding a padding top and bottom to article of the page.

    Add this code to the code area of the Hook element:

    <style id="hook-element-styling">
    .inside-article {
        padding: 40px 0px !important;
    }
    </style>

    and then copy the display rule location of the layout element to this hook element

    A wise man once said:
    "Have you cleared your cache?"

    #2055218
    John

    OK yes – that explains it perfectly thank you.

    #2055221
    Elvin
    Staff
    Customer Support

    Does it work for you? Let us know if you need further help. 😀

    A wise man once said:
    "Have you cleared your cache?"

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