How to clear a float using CSS

The CSS clear property specifies what elements can float beside the cleared element and on which side.And i have the right trick for you to be able to clear a float using CSS

clear:before,
.clear:after {
    content: " ";
    display: table;
}

.clear:after {
    clear: both;
}