Margins and padding
Class | Description | Demo |
---|
.m-0 | Margin 0 | Margin 0 |
.m-1 | Margin 1 | Margin 1 |
.m-2 | Margin 2 | Margin 2 |
.p-0 | Padding 0 | Padding 0 |
.p-1 | Padding 1 | Padding 1 |
.p-2 | Padding 2 | Padding 2 |
Specify the direction of the margin or padding by adding a direction suffix to the class name. For example, .mt-1
will add a margin of 1 to the top of the element.
Class | Description | Demo |
---|
.mt-1 | Margin top 1 | Margin top 1 |
.mr-1 | Margin right 1 | Margin right 1 |
.mb-1 | Margin bottom 1 | Margin bottom 1 |
.ml-1 | Margin left 1 | Margin left 1 |
.pt-1 | Padding top 1 | Padding top 1 |
.pr-1 | Padding right 1 | Padding right 1 |
.pb-1 | Padding bottom 1 | Padding bottom 1 |
.pl-1 | Padding left 1 | Padding left 1 |