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
We walked the riverbank at dawn to record the city before the first trains arrived.
The flow-root container encloses its floated child when the surrounding text is short.
<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
| Class | CSS declarations |
|---|---|
float-left | float: left; |
float-right | float: right; |
float-none | float: none; |
View full generated CSS
.float-left {
float: left;
}
.float-none {
float: none;
}
.float-right {
float: right;
}