Clearing a Float without Source Markup


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

just add a class of .clearfix to any element containing a float needing to be cleared


Copy this code and paste it in your HTML
  1. .clearfix:after {
  2. content: ".";
  3. display: block;
  4. height: 0;
  5. clear: both;
  6. visibility: hidden;
  7. }

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.