Spacing

Spacing according to pixels

Spacer valuePixel value
0
1
1.5
2
2.5
3
3.5
4
4.5
5
5.5
6

Margin

Margin utilities are structured as .m{direction}-{level}. Negative numbers are represented as n1, n2, n3, etc. Choose a direction and spacing level to change the margin applied to the center block below.

Direction
.mr-3

Padding

Padding utilities are structured the same way: .p{direction}-{level}.

All Spacing Utility Classes

All directionsTopRightBottomLeftX DirectionY Direction
Margin
.m-6.m-5.5.m-5.m-4.5.m-4.m-3.5.m-3.m-2.5.m-2.m-1.5.m-1.m-0.m-n1.m-n1.5.m-n2.m-n2.5.m-n3.m-n3.5.m-n4.m-n4.5.m-n5.m-n5.5.m-n6.mt-6.mt-5.5.mt-5.mt-4.5.mt-4.mt-3.5.mt-3.mt-2.5.mt-2.mt-1.5.mt-1.mt-0.mt-n1.mt-n1.5.mt-n2.mt-n2.5.mt-n3.mt-n3.5.mt-n4.mt-n4.5.mt-n5.mt-n5.5.mt-n6.mr-6.mr-5.5.mr-5.mr-4.5.mr-4.mr-3.5.mr-3.mr-2.5.mr-2.mr-1.5.mr-1.mr-0.mr-n1.mr-n1.5.mr-n2.mr-n2.5.mr-n3.mr-n3.5.mr-n4.mr-n4.5.mr-n5.mr-n5.5.mr-n6.mb-6.mb-5.5.mb-5.mb-4.5.mb-4.mb-3.5.mb-3.mb-2.5.mb-2.mb-1.5.mb-1.mb-0.mb-n1.mb-n1.5.mb-n2.mb-n2.5.mb-n3.mb-n3.5.mb-n4.mb-n4.5.mb-n5.mb-n5.5.mb-n6.ml-6.ml-5.5.ml-5.ml-4.5.ml-4.ml-3.5.ml-3.ml-2.5.ml-2.ml-1.5.ml-1.ml-0.ml-n1.ml-n1.5.ml-n2.ml-n2.5.ml-n3.ml-n3.5.ml-n4.ml-n4.5.ml-n5.ml-n5.5.ml-n6.mx-6.mx-5.5.mx-5.mx-4.5.mx-4.mx-3.5.mx-3.mx-2.5.mx-2.mx-1.5.mx-1.mx-0.mx-n1.mx-n1.5.mx-n2.mx-n2.5.mx-n3.m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