css clearfix for floats with display table and clear both

Solutions on MaxInterview for css clearfix for floats with display table and clear both by the best coders in the world

showing results for - "css clearfix for floats with display table and clear both"
Blue
10 Oct 2018
1/* A clearfix is a way for an element 
2to clear its child elements automatically without any additional markup.
3The clearfix property is generally used in float layouts where elements 
4are floated to be stacked horizontally. ... The clearfix property allows
5a container to wrap its floated children.
6*/
7
8.clearfix {
9  overflow: auto;
10}
Emilia
08 Jan 2018
1.group:after {
2  content: "";
3  display: table;
4  clear: both;
5}
6
7<div class="group">
8  <div class="is-floated"></div>
9  <div class="is-floated"></div>
10  <div class="is-floated"></div>
11</div>