Browse documentation

Reference / Layout

Float

Float an illustration or a large initial to one side so adjacent lines of text can wrap around it.

Working example

The flow-root container encloses its floated child when the surrounding text is short.

HTML
<p class="flow-root max-w-sm">
  <span class="float-left mr-3 font-serif text-5xl">W</span>e walked
  the riverbank at dawn to record the city before the first trains arrived.
</p>

Class reference

ClassCSS declarations
float-leftfloat: left;
float-rightfloat: right;
float-nonefloat: none;
View full generated CSS
Compiled CSS
.float-left {
  float: left;
}
.float-none {
  float: none;
}
.float-right {
  float: right;
}