March 2017
Intermediate to advanced
821 pages
18h 21m
English
Bootstrap 4 adds a new set of utility classes called spacing utility classes. These classes allow you to quickly add spacing in any direction of an element via margin or padding.
The format of these classes is [margin or padding]-[direction]-[size].
For margin or padding, use the following:
m for marginp for paddingFor direction, you can use these:
a for allt for topr for rightl for leftb for bottomx for left and righty for top and bottomYou can use these for sizes:
0 for zero1 for 1rem2 for 1.5rem3 for 3remHere is an example to demonstrate the spacing utility classes. Place this code at the end of the container element of index.html:
<hr> <div class="row"> <div class="col-xs-12 m-t-2"> <p> Lorem ipsum dolor sit amet, at suscipit ...
Read now
Unlock full access