Back to Mjml

README

packages/mjml-spacer/README.md

5.1.01.6 KB
Original Source

mj-spacer

Displays a blank space, that can be used to separate content.

xml
<mjml>
  <mj-body>
    <mj-section>
      <mj-column>
        <mj-text>A first line of text</mj-text>
        <mj-spacer height="50px" />
        <mj-text>A second line of text</mj-text>
      </mj-column>
    </mj-section>
  </mj-body>
</mjml>

Attributes

attributeacceptsdescriptiondefault value
container-background-colorCSS color formatsinner element background color
css-classstringclass name, added to the root HTML element created
heightpx %spacer height0px
paddingpx %spacer padding, supports up to 4 parameters
padding-bottompx %bottom padding
padding-leftpx %left padding
padding-rightpx %right padding
padding-toppx %top padding
<p class="cta-container"><a class="cta" href="https://mjml.io/try-it-live/components/spacer">Try it live</a></p>