css - Clearfix: Height 1% -


in premium templates on themeforest, see many templates adopt method clearfix:

.clearfix {     height: 1%; } 

and add class clearfix various elements.

why height 1%? way?

setting height explicitly safest (read not cleanest) way clear floats. in themes, actual clearfix implementation use :after pseudo selector clear floats. :after property not supported in ie6/7. thus, height: 1% specified. works in ie6/7.

source http://www.pewpewlaser.com/articles/clearfix-ie


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -