Open this example in the interactive library
Source code
<style>
.demo {
display: flow-root;
}
.demo .tile {
float: inline-start;
}
</style>
<div class="demo"><span class="tile">Contained float</span></div>
Contain a float with flow-root with native CSS. The preview includes a small shared demo stylesheet.
Open this example in the interactive library
<style>
.demo {
display: flow-root;
}
.demo .tile {
float: inline-start;
}
</style>
<div class="demo"><span class="tile">Contained float</span></div>