.clearfix:after { clear: both; } &:after,&:before{ content: " "; visibility: hidden; display: block; height: 0; clear: both; }