
| Current Path : /var/www/html/konvbav/vendor/twbs/bootstrap/site/src/content/docs/utilities/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/konvbav/vendor/twbs/bootstrap/site/src/content/docs/utilities/float.mdx |
---
title: Float
description: Toggle floats on any element, across any breakpoint, using our responsive float utilities.
toc: true
---
import { getData } from '@libs/data'
## Overview
These utility classes float an element to the left or right, or disable floating, based on the current viewport size using the [CSS `float` property](https://developer.mozilla.org/en-US/docs/Web/CSS/float). `!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.
<Example code={`<div class="float-start">Float start on all viewport sizes</div><br>
<div class="float-end">Float end on all viewport sizes</div><br>
<div class="float-none">Don’t float on all viewport sizes</div>`} />
Use the [clearfix helper]([[docsref:/helpers/clearfix]]) on a parent element to clear floats.
## Responsive
Responsive variations also exist for each `float` value.
<Example code={`<div class="float-sm-end">Float end on viewports sized SM (small) or wider</div><br>
<div class="float-md-end">Float end on viewports sized MD (medium) or wider</div><br>
<div class="float-lg-end">Float end on viewports sized LG (large) or wider</div><br>
<div class="float-xl-end">Float end on viewports sized XL (extra large) or wider</div><br>
<div class="float-xxl-end">Float end on viewports sized XXL (extra extra large) or wider</div><br>`} />
Here are all the support classes:
<ul>
{getData('breakpoints').map((breakpoint) => {
return (
<Fragment>
<li><code>.float{breakpoint.abbr}-start</code></li>
<li><code>.float{breakpoint.abbr}-end</code></li>
<li><code>.float{breakpoint.abbr}-none</code></li>
</Fragment>
)
})}
</ul>
## CSS
### Sass utilities API
Float utilities are declared in our utilities API in `scss/_utilities.scss`. [Learn how to use the utilities API.]([[docsref:/utilities/api#using-the-api]])
<ScssDocs name="utils-float" file="scss/_utilities.scss" />