Clearfix Solution for Floats in CSS


Apply the clearfix technique to a container to ensure it encompasses its floated children.

Source Code

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments