clear

Specifies whether an element should be moved below any 'floating' elements that come before it. It's the classic way to 'break' out of a float layout and start fresh on a new line.

It is documented as part of the CSS Positioned Layout specification.

/* Usage Example */
.footer {
  clear: both;
  /* forces the footer to sit below all floated sidebars or images */
}

/* Syntax */
clear: none;
clear: left;
clear: right;
clear: both;
clear: inline-start;
clear: inline-end;

/* Global values */
clear: inherit;
clear: initial;
clear: revert;
clear: revert-layer;
clear: unset;
Widely available Since 2015 96% global usage

This feature is well established and works across many devices and browser versions. It has been available across browsers since 2015.

1+
1+
1+
12+
Kinsta

Your first month is free

Managed WordPress hosting for faster sites.

Learn more

New CSS drops.

Join 600+ readers who've survived clearfix hacks.

ESC