Posted By

mehigh on 10/28/10


Tagged

clearfix


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

laurentzziu
alf


Clearfix using zero-width-space character


 / Published in: CSS
 

URL: http://www.fileformat.info/info/unicode/char/200b/index.htm

The simplest implementation of clearfix. \200B is in fact the zero width space character, therefore no need to apply the visibility:hidden on a '.' (as the 'standard' out there).

  1. .clearfix:after { clear: both; content: "\200B"; display: block; height: 0; }
  2. .clearfix { zoom: 1; }

Report this snippet  

You need to login to post a comment.