ben-g
4/6/2017 - 4:39 PM

Clearfix

Clearfix

/*This will do you fine these days (IE 8 and up): */

.group:after {
  content: "";
  display: table;
  clear: both;
}

/* Apply it to any parent element in which you need to clear the floats. 
For example:

<div class="group">
  <div class="is-floated"></div>
  <div class="is-floated"></div>
  <div class="is-floated"></div>
</div>
You would use this instead of clearing the float with something like 
<br style="clear: both;" /> at the bottom of the parent 
(easy to forget, not handleable right in CSS, non-semantic) 
or using something like overflow: hidden; on the parent 
(you don't always want to hide overflow).
****************************************************************************************/