Blossom of April

Discussion board for a group of IT enthusiasts.


You are not connected. Please login or register

Use of Clearfix Class

View previous topic View next topic Go down  Message [Page 1 of 1]

1 Use of Clearfix Class on August 13th 2015, 1:49 pm


We mostly see that inside body div with container and clearfix class. We know about container class, but not think why use clearfix class here.
When any element floated with right or left and he’s parent not floated, at that time parent height become the parent actual height minus his child height so that we not get a proper box layout.
In this type of condition we need to use clearfix class in parent element so we can get proper box layout. In the below clearfix class css.

Code:
.clearfix:after {
   content: " ";
   visibility: hidden;
   display: block;
   height: 0;
   clear: both;
}

For more please review :http://www.frontendevelopers.com/

View user profile

View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum