Clear floated divs without extra markup


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



Copy this code and paste it in your HTML
  1. .clearfloat:after {
  2. display:block;
  3. visibility:hidden;
  4. clear:both;
  5. height:0;
  6. content:".";
  7. }
  8.  
  9. .clearfloat {
  10. display:inline-block
  11. }
  12.  
  13. .clearfloat {
  14. display:block
  15. }

URL: http://www.positioniseverything.net/easyclearing.html

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.