Margins and Padding

If you're in need of extra padding or margins around your elements you can use one of these easy divs to add CSS-powered padding and margin classes. Simply add .extra-padding or .extra-margin to your element.

You can also increase the size of the padding or margins by adding -1, -2, -3 or -4 to the end of the class.

Responsive Note: .extra-padding adds padding around the entire element. The side padding is removed on screens below 768px wide. .extra-margin only adds a margin to the top and bottom of the element.

Padding

.extra-padding (default - 1.75em)
.extra-padding-1 (1em)
.extra-padding-2 (2em)
.extra-padding-3 (3em)
.extra-padding-4 (4em)

Other Padding Classes

  • .p-0 applies padding:0;
  • .pt-0 applies padding-top:0;
  • .pl-0 applies padding-left:0;
  • .pr-0 applies padding-right:0;
  • .pb-0 applies padding-bottom:0;

Margin

.extra-margin (default - .5em)
.extra-margin-1 (1em)
.extra-margin-2 (2em)
.extra-margin-3 (3em)
.extra-margin-4 (4em)

Other Margin Classes

  • .m-0 applies margin:0;
  • .mt-0 applies margin-top:0;
  • .ml-0 applies margin-left:0;
  • .mr-0 applies margin-right:0;
  • .mb-0 applies margin-bottom:0;