Blossom of April
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Blossom of April

Discussion board for a group of IT enthusiasts.


You are not connected. Please login or register

Use of Clearfix Class

Go down  Message [Page 1 of 1]

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

safaa

safaa
Use of Clearfix Class Clearf10

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/

Back to top  Message [Page 1 of 1]

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