We mostly see that inside body div with container and clearfix class. We know about container class, but not think why use clearfix class here.

When any element floated with right or left and he’s parent not floated, at that time parent height become the parent actual height minus his child height so that we not get a proper box layout.

clearfixclass

In this type of condition we need to use clearfix class in parent element so we can get proper box layout. In the below clearfix class css.

TRY IT NOW