Spacing

SpaceMax includes a wide range of shorthand responsive margin and padding utility classes to modify an element's appearance. The Bootstrap default spacer also available along with SpaceMax

Open Bootstrap Default Spacing

How it works

Assign responsive-friendly margin or padding values to an element or a subset of its sides with shorthand classes. Includes support for individual properties, all properties, and vertical and horizontal properties. Classes are built from Scss mixins Sass from .10rem to 100rem.

Spacer Class Reference

Spacer for sections

.space
Apply padding at the top and bottom of the element.
.space--2
Apply a little more padding than .space at the top and bottom of the element.
.space--3
Apply more padding than .space--2 at the top and bottom of the element.

.space--top
Apply padding at the top of the element.
.space--top--2
Apply a little more padding than .space--top at the top of the element.
.space--top--3
Apply more padding than .space--top--2 at the top of the element.

.space--bottom
Apply padding at the bottom of the element.
.space-bottom---2
Apply a little more padding than .space--bottom at the bottom of the element.
.space-bottom--3
Apply more padding than .space--bottom--2 at the bottom of the element.
Margin and Padding for elements

The classes are named using the format {property}{sides}-{size}


Where property is one of:

  • m - for classes that set margin
  • p - for classes that set padding

Where sides is one of:

    • t - for classes that set margin-top or padding-top
    • b - for classes that set margin-bottom or padding-bottom
    • l - for classes that set margin-left or padding-left
    • r - for classes that set margin-right or padding-right

Where size is one of:

    • 1 - for classes that eliminate the margin or padding by setting it to 10px
    • 2 - for classes that eliminate the margin or padding by setting it to 20px
    • 3 - for classes that eliminate the margin or padding by setting it to 30px
    • 4 - for classes that eliminate the margin or padding by setting it to 40px
    • 5 - for classes that eliminate the margin or padding by setting it to 50px
    • 6 - for classes that eliminate the margin or padding by setting it to 60px
    • 7 - for classes that eliminate the margin or padding by setting it to 70px
    • 8 - for classes that eliminate the margin or padding by setting it to 80px
    • 9 - for classes that eliminate the margin or padding by setting it to 90px
    • 10 - for classes that eliminate the margin or padding by setting it to 100px

Example

client client client client client

                                                <section class="space bg-dark">
                                                <div class="container">
                                                    <div class="row">
                                                        <div class="col-12 col-lg-10 mx-auto d-flex flex-column flex-md-row justify-content-between text-center">
                                                            <span class="mb-3 mb-md-0"><img src="img/logo-1.png" alt="client"></span>
                                                            <span class="mb-3 mb-md-0"><img src="img/logo-2.png" alt="client"></span>
                                                            <span class="mb-3 mb-md-0"><img src="img/logo-3.png" alt="client"></span>
                                                            <span class="mb-3 mb-md-0"><img src="img/logo-4.png" alt="client"></span>
                                                            <span class="mb-3 mb-md-0"><img src="img/logo-5.png" alt="client"></span>
                                                        </div>
                                                        <!-- end of col -->
                                                    </div>
                                                    <!-- end of row -->
                                                </div>
                                                <!-- end of container -->
                                            </section>
                                        

                                                <div class="card">
                                                <div class="py-3 pl-2">
                                                    <span class="icon--lg bg-color--primary color--white rounded--full mx-1">
                                                        <i class="icon icon-key"></i>
                                                    </span>
                                                    <span class="icon--lg bg-color--primary color--white rounded--full mx-1">
                                                        <i class="icon icon-logo-dropbox"></i>
                                                    </span>
                                                    <span class="icon--lg bg-color--primary color--white rounded--full mx-1">
                                                        <i class="icon icon-logo-dribbble"></i>
                                                    </span>
                                                </div>
                                            </div>