Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

what does clearfix for floats do in css

/* A clearfix is a way for an element 
to clear its child elements automatically without any additional markup.
The clearfix property is generally used in float layouts where elements 
are floated to be stacked horizontally. ... The clearfix property allows
a container to wrap its floated children.
*/

.clearfix {
  overflow: auto;
}
Source by www.educative.io #
 
PREVIOUS NEXT
Tagged: #clearfix #floats #css
ADD COMMENT
Topic
Name
2+5 =