Float


displayn/a positionn/a z-indexn/a font-size scalingn/a breakpointsno

Class list

  • .to-left
  • .to-right
  • .no-float
  • .clear-left
  • .clear-right
  • .clear-both

Description

Use the .to-left class to float an element to the left, and the .to-right class to float an element to the right.

<div class="clearfix p-1 b mb-2">
    <figure class="square danger x2 to-left"></figure>
    <figure class="square dark x2 to-right"></figure>
</div>

Clear

Use the clear classes on an element that comes after a floated element to correct its flow.

without clear-left

with clear-left

<div class="grid">
    <div class="unit-6">
        <button class="close to-left"></button>
        <p>without clear-left</p>
    </div>
    <div class="unit-6">
        <button class="close to-left"></button>
        <p class="clear-left">with clear-left</p>
    </div>
</div>

Clearfix

The .clearfix class can be found in the grid file.