Float · Bootstrap v4.5 | bootstrap float
![Float · Bootstrap v4.5](https://i.imgur.com/axBPWDg.jpg)
Togglefloatsonanyelement,acrossanybreakpoint,usingourresponsivefloatutilities.OverviewTheseutilityclassesfloatanelementtotheleftorright,ordisablefloating,basedonthecurrentviewportsizeusingtheCSSfloatproperty[1].!importantisincludedtoavoidspecificityissues.Theseusethesameviewportbreakpointsasourgridsystem.Pleasebeawarefloatutilitieshavenoeffectonflexitems.ClassesToggleafloatwithaclass:FloatleftonallviewportsizesFloatrightonallviewportsizesDontfloatonallviewportsizes
Toggle floats on any element, across any breakpoint, using our responsive float utilities.
OverviewThese utility classes float an element to the left or right, or disable floating, based on the current viewport size using the CSS float property[1]. !important is included to avoid specificity issues. These use the same viewport breakpoints as our grid system. Please be aware float utilities have no effect on flex items.
ClassesToggle a float with a class:
Float left on all viewport sizes
Float right on all viewport sizes
Dont float on all viewport sizes
<div class="float-left">Float left on all viewport sizes</div><br> <div class="float-right">Float right on all viewport sizes</div><br> <div class="float-none">Dont float on all viewport sizes</div>MixinsOr by Sass mixin:
.element { @include float-left; } .another-element { @include float-righ...