.clear { clear: both; display: block; overflow: hidden; visibility: hidden; width: 0; height: 0; margin:0; padding:0; border: none; } .clearfix:before, .clearfix:after { content: '\0020'; display: block; overflow: hidden; visibility: hidden; width: 0; height: 0; margin:0; padding:0; } .clearfix:after { clear: both; }