![]() |
VOOZH | about |
The spacing utility is used to assign responsive-friendly margin or padding values to an element or a subgroup of its sides. Padding is the area inside of any div or container, as opposed to a margin, which is the area outside of it. Margin and Padding can be added by adding Bootstrap classes in an element or container.
To change an element's appearance, Bootstrap offers a variety of responsive margin and padding utility classes. The classes are named using the format {property}{sides}-{breakpoint}-{size} for sizes s, md, xs, lg, xl, XXL. Here sides can be t(top), b(bottom), e(end),s (start), etc.
Example 1: Here is an example of margin and padding using bootstrap spacing classes.
Output:
Example 2: Here is an example of a gap using bootstrap spacing classes.
Output:
Reference: https://getbootstrap.com/docs/5.0/utilities/spacing/