Return to Snippet

Revision: 11145
at October 1, 2010 19:29 by mihael


Updated Code
/* CLEAR FLOATS
/* Add class "clear" to elements that contain floated elements and they will hold the height correctly
/* updated: 01.10.2010
*******************************************************/
.clear:before,
.clear:after {
  content: ".";    
  display: block;    
  height: 0;    
  visibility: hidden;	
}
.clear:after {clear: both;}
.clear {zoom: 1;}
/*******************************************************/

Revision: 11144
at January 26, 2009 09:12 by mihael


Initial Code
/* CLEAR FLOATS
/* Add class "clear" to elements that contain floated elements and they will hold the height correctly
*******************************************************/
.clear { display: inline-block; }   
.clear:after, .container:after {
content: ".";
display: block;
height: 0; 
clear: both; 
visibility: hidden;
}
.clear { display: block; }
/*******************************************************/

Initial URL


Initial Description
Add class \"clear\" to elements that contain floated elements and they will hold the height correctly

Initial Title
Clear floats - cleaner clearfix

Initial Tags
css

Initial Language
CSS