Posted By

sidisinsane on 04/22/11


Tagged

clearfix


Versions (?)

Crossbrowser Micro Clearfix Hack


 / Published in: CSS
 

URL: http://nicolasgallagher.com/micro-clearfix-hack/

Nicolas Gallagher's new micro clearfix hack

  1. /* For modern browsers */
  2. selector:before,
  3. selector:after {
  4. content: "";
  5. display: block;
  6. }
  7. selector:after {
  8. clear: both;
  9. }
  10. /* For IE 6/7 (trigger hasLayout) */
  11. selector {
  12. zoom: 1;
  13. }

Report this snippet  

You need to login to post a comment.