Spacing · Bootstrap v4.6 | Bootstrap 4 my-auto
Bootstrapincludesawiderangeofshorthandresponsivemarginandpaddingutilityclassestomodifyanelement’sappearance.HowitworksAssignresponsive-friendlymarginorpaddingvaluestoanelementorasubsetofitssideswithshorthandclasses.Includessupportforindividualproperties,allproperties,andverticalandhorizontalproperties.ClassesarebuiltfromadefaultSassmaprangingfrom.25remto3rem.NotationSpacingutilitiesthatapplytoallbreakpoints,fromxstoxl,havenobreakpointabbreviationinthem.Thisisbecausethoseclassesareappliedfrom...
Bootstrap includes a wide range of shorthand responsive margin and padding utility classes to modify an element’s appearance.
How it worksAssign 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 a default Sass map ranging from .25rem to 3rem.
NotationSpacing utilities that apply to all breakpoints, from xs to xl, have no breakpoint abbreviation in them. This is because those classes are applied from min-width: 0 and up, and thus are not bound by a media query. The remaining breakpoints, however, do include a breakpoint abbreviation.
The classes are named using the format {property}{sides}-{size} for xs and {property}{sides}-{breakpoint}-{size} for sm, md, lg, and xl.
Where property is one of:
m - for classes that set margin p - for cla...