From the course: Bootstrap 4 Essential Training
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Margin and padding - Bootstrap Tutorial
From the course: Bootstrap 4 Essential Training
Margin and padding
- [Narrator] One of the richest group of classes in Bootstrap are the Spacing classes. Now this mimics exactly the margin and padding classes in CSS. They look really complicated, but once you get used to them you'll pick them up pretty quickly. So let's take a look at how they work. This is a very complicated looking formula, but it actually is pretty straightforward. So you start by specifying a property right here, like margin or padding. So then you would specify one of the sides. So you could say something like padding top, or padding bottom, padding x for both the left and right sides or padding y, and then, that would mean the top and bottom. Now notice that there is no hyphen between the "p" or the "m" and then one of the sides. Then optionally, you could specify a break point here, so that does get a hyphen. So you could say padding y on the xl break point only, and then you can specify one of the sizes. So the sizes go from zero to five, and essentially the base size for…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Layout overview1m 15s
-
(Locked)
Using containers9m 32s
-
(Locked)
Working with rows and columns12m 1s
-
(Locked)
Multiple column classes8m 43s
-
(Locked)
Offset columns2m 42s
-
Nested columns5m 3s
-
(Locked)
Custom order3m 43s
-
(Locked)
Grid alignment options8m 23s
-
(Locked)
Display properties10m 26s
-
(Locked)
Flexbox container options11m 21s
-
(Locked)
Individual flex elements4m 38s
-
(Locked)
Floating elements4m 26s
-
(Locked)
Margin and padding5m 11s
-
(Locked)
Visibility2m 53s
-
(Locked)
Sizing utilities3m 53s
-
(Locked)
Using borders3m 50s
-
(Locked)
-
-
-
-
-
-