loading...

Bootstrap 4 – Clearfix

The Bootstrap clearfix class allows one to quickly clear floated content. This is desirable when you want to clear the horizontal alignment of elements and force the parent container element to wrap around its children.


The term “floated content” simply refers to any elements whose float property has been set, which results in elements being aligned horizontally.

In the Bootstrap style sheet, the clearfix class is defined as follows:

.clearfix::after {
     display: block;
     clear: both;
     content: "";
}

Comments are closed.

loading...