These docs are for the prereleased 1.0.0.alpha3 version of Bootstrap Email - Give Feedback
Set vertical "margin" between elements.

Class Properties
.my-0Make a 0px spacer above and below
.mt-0Make a 0px spacer above
.mb-0Make a 0px spacer below
.my-1Make a 4px spacer above and below
.mt-1Make a 4px spacer above
.mb-1Make a 4px spacer below
.my-2Make a 8px spacer above and below
.mt-2Make a 8px spacer above
.mb-2Make a 8px spacer below
.my-3Make a 12px spacer above and below
.mt-3Make a 12px spacer above
.mb-3Make a 12px spacer below
.my-4Make a 16px spacer above and below
.mt-4Make a 16px spacer above
.mb-4Make a 16px spacer below
.my-5Make a 20px spacer above and below
.mt-5Make a 20px spacer above
.mb-5Make a 20px spacer below
.my-6Make a 24px spacer above and below
.mt-6Make a 24px spacer above
.mb-6Make a 24px spacer below
.my-7Make a 28px spacer above and below
.mt-7Make a 28px spacer above
.mb-7Make a 28px spacer below
.my-8Make a 32px spacer above and below
.mt-8Make a 32px spacer above
.mb-8Make a 32px spacer below
.my-9Make a 36px spacer above and below
.mt-9Make a 36px spacer above
.mb-9Make a 36px spacer below
.my-10Make a 40px spacer above and below
.mt-10Make a 40px spacer above
.mb-10Make a 40px spacer below
.my-12Make a 48px spacer above and below
.mt-12Make a 48px spacer above
.mb-12Make a 48px spacer below
.my-16Make a 64px spacer above and below
.mt-16Make a 64px spacer above
.mb-16Make a 64px spacer below
.my-20Make a 80px spacer above and below
.mt-20Make a 80px spacer above
.mb-20Make a 80px spacer below
.my-24Make a 96px spacer above and below
.mt-24Make a 96px spacer above
.mb-24Make a 96px spacer below
.my-32Make a 128px spacer above and below
.mt-32Make a 128px spacer above
.mb-32Make a 128px spacer below
.my-40Make a 160px spacer above and below
.mt-40Make a 160px spacer above
.mb-40Make a 160px spacer below
.s-0Make a spacer 0px tall
.s-1Make a spacer 4px tall
.s-2Make a spacer 8px tall
.s-3Make a spacer 12px tall
.s-4Make a spacer 16px tall
.s-5Make a spacer 20px tall
.s-6Make a spacer 24px tall
.s-7Make a spacer 28px tall
.s-8Make a spacer 32px tall
.s-9Make a spacer 36px tall
.s-10Make a spacer 40px tall
.s-12Make a spacer 48px tall
.s-16Make a spacer 64px tall
.s-20Make a spacer 80px tall
.s-24Make a spacer 96px tall
.s-32Make a spacer 128px tall
.s-40Make a spacer 160px tall

Note: Margin is only supported on the top and bottom.

Margin Usage

There are two types of spacing Bootstrap Email supports. Padding (applied to the inside of table cells) and Margin (in the form of vertical spacers which are used to take up space between elements vertically).

Margin is very inconsistently supported in email clients. Instead of using margin in css the margin classes create spacers above and/or below and element for simpler syntax like Bootstrap. This example adds a spacer of 12px above and below the middle card. See space between for more info on adding spacers between elements.

<div class="card card-body">Top Card</div>
<div class="card card-body my-3">Middle Card (with margin above and below)</div>
<div class="card card-body">Bottom Card</div>
Top Card
Middle Card (with margin about and below)
Bottom Card

Spacer Usage

<div class="s-3"></div>

Spacers hold not content, they are just put into the document to sit between elements in a vertical flow.


Compiled Example

Input

<a class="btn btn-primary my-3" href="http://example.com">Button with mega margin</a>

Output

<table class="s-3 w-full" role="presentation" border="0" cellpadding="0" cellspacing="0" style="width: 100%;" width="100%">
  <tbody>
    <tr>
      <td style="line-height: 12px; font-size: 12px; width: 100%; height: 12px; margin: 0;" align="left" width="100%" height="12">
         
      </td>
    </tr>
  </tbody>
</table>
<table class="btn btn-primary" role="presentation" border="0" cellpadding="0" cellspacing="0" style="border-radius: 6px; border-collapse: separate !important;">
  <tbody>
    <tr>
      <td style="line-height: 24px; font-size: 16px; border-radius: 6px; margin: 0;" align="center" bgcolor="#0d6efd">
        <a href="http://example.com" style="color: #ffffff; font-size: 16px; font-family: Helvetica, Arial, sans-serif; text-decoration: none; border-radius: 6px; line-height: 20px; display: inline-block; font-weight: normal; white-space: nowrap; background-color: #0d6efd; padding: 8px 12px; border: 1px solid #0d6efd;">Button with mega margin</a>
      </td>
    </tr>
  </tbody>
</table>
<table class="s-3 w-full" role="presentation" border="0" cellpadding="0" cellspacing="0" style="width: 100%;" width="100%">
  <tbody>
    <tr>
      <td style="line-height: 12px; font-size: 12px; width: 100%; height: 12px; margin: 0;" align="left" width="100%" height="12">
         
      </td>
    </tr>
  </tbody>
</table>