Padding and marginclasses

Assign marginor paddingto an element or a subset of its sides with shorthand classes. Includes support for individual properties, all properties, and vertical and horizontal properties. It uses Bootstrap 4 spacing format of {property}{sides}-{size}. Available sizes can be any of:

  • 10, 20, 30, 40, 50, 60, 70, 80, 90, 100
  • 12, 16, 24
  • 15, 25, 35, 45
  • 120, 140, 160, 180
  • 100, 150, 200, 250, 300, 400, 500

Padding classes
Class nameDescription
.pt-40padding-top: 40px
.pb-40padding-bottom: 40px
.pl-40padding-left: 40px
.pr-40padding-right: 40px
.px-40padding-left: 40px
padding-right: 40px
.py-40padding-top: 40px
padding-bottom: 40px
.p-40padding: 40px

Margin classes
Class nameDescription
.mt-40margin-top: 40px
.mb-40margin-bottom: 40px
.ml-40margin-left: 40px
.mr-40margin-right: 40px
.mx-40margin-left: 40px
margin-right: 40px
.my-40margin-top: 40px
margin-bottom: 40px
.m-40margin: 40px

Gapitems

These classes apply to a parent and make a horizontal gapbetween all immediate children by giving them margin-leftand margin-rightproperty.

Class nameGap size
.gap-items-14px
.gap-items-28px
.gap-items-3or .gap-items16px
.gap-items-424px
.gap-items-532px

Vertical and horizontal gap

Add .gap-yto any of .gap-items-*classes to have both vertical and horizontal gaps. These classes are meant to be use for parent that have a lot of children which break horizontal line and need space in vertical direction as well.