Bootstrap 5 Basic
Bootstrap 5 Utilities
Bootstrap 5 Flexbox
Bootstrap 5 provides utility classes for floating elements to align them to the left or right. These classes are responsive, allowing float behaviors to change across different screen sizes.
float-{size?}-{type}
float
: Indicates display.size
(optional): Responsive breakpoint (e.g., sm
: ≥576px, md
: ≥ 768px, lg
: ≥992px, xl
: ≥1200px, xxl
: ≥1400px).type
: Defines the display type (e.g., start
, end
, none
).Example:
.float-start
.float-sm-start
.float-md-start
.float-lg-start
.float-xl-start
.float-xxl-start
Class |
Description |
---|---|
float-start |
Floats the element to the left |
float-end |
Floats the element to the right |
float-none |
Removes float alignment |
Try it yourself