clearfix class by brad

  1. When an html element has a property of float then the element after that will float at the end. So, use this clearflix class in an element which has a property float.
  2. Element with float releases the spaces like absolute positioning. To avoid overlap, the parent element should contain clearfix class.
.clearfix:after {
 content:".";
 display:block;
 height:0;
 clear:both;
 visibility:hidden;
}
.clearfix {
 display:inline-block;
}
/*Hides from IE-mac \*/
*html .clearfix{height:1%;}
clearfix{display:block;}end 
/*End hide from IE-mac */
/* @end */

Labels: ,

© copyright-2020 Rejaul