1
0
Fork 0
bootstrap-html/site/content/docs/5.3/helpers/clearfix.md
Daniel Baumann e92720b6a7
Merging upstream version 5.3.0+dfsg.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-02-17 07:08:19 +01:00

944 B

layout title description group aliases
docs Clearfix Quickly and easily clear floated content within a container by adding a clearfix utility. helpers /docs/5.3/helpers/

Easily clear floats by adding .clearfix to the parent element. Can also be used as a mixin.

Use in HTML:

<div class="clearfix">...</div>

The mixin source code:

{{< scss-docs name="clearfix" file="scss/mixins/_clearfix.scss" >}}

Use the mixin in SCSS:

.element {
  @include clearfix;
}

The following example shows how the clearfix can be used. Without the clearfix the wrapping div would not span around the buttons which would cause a broken layout.

{{< example >}}

{{< /example >}}