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.

Floating elements

Floating elements - Bootstrap Tutorial

From the course: Bootstrap 4 Essential Training

Start my 1-month free trial

Floating elements

- [Instructor] Floating elements is a bit less popular now that we have Flexbox available to us, but there's still some instances where it might be necessary to work with it, so let's take a look at the classes that allow you to work with elements that are floating. Now they're pretty easy to use, and if you're used to the formulas, this is what this one looks like. You use the float class and then optionally you include a break point as well as a side, and the sides can be float to the left, the right, or none. So if you're used to CSS, this is pretty much what you can do with CSS, except that Bootstrap gives you this capability of using break points. Let's take a look at how it works in a practical sense. So what we have here is a set of items. I've added some additional classes right here to these items, just because I don't want to have a bunch of distracting classes. So I've created this class of item as a shortcut, and all these are inside a bg-info container, and we're going to…

Contents