Clearfix using zero-width-space character


/ Published in: CSS
Save to your folder(s)

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).


Copy this code and paste it in your HTML
  1. .clearfix:after { clear: both; content: "\200B"; display: block; height: 0; }
  2. .clearfix { zoom: 1; }

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.