Last active
July 10, 2017 17:12
-
-
Save ShuvoHabib/153d34fb6c08d433b109c4b2136311a4 to your computer and use it in GitHub Desktop.
Bootstrap Clearfix Extension for rows
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@media (min-width:1200px){ | |
.auto-clear .col-lg-1:nth-child(12n+1){clear:left;} | |
.auto-clear .col-lg-2:nth-child(6n+1){clear:left;} | |
.auto-clear .col-lg-3:nth-child(4n+1){clear:left;} | |
.auto-clear .col-lg-4:nth-child(3n+1){clear:left;} | |
.auto-clear .col-lg-6:nth-child(odd){clear:left;} | |
} | |
@media (min-width:992px) and (max-width:1199px){ | |
.auto-clear .col-md-1:nth-child(12n+1){clear:left;} | |
.auto-clear .col-md-2:nth-child(6n+1){clear:left;} | |
.auto-clear .col-md-3:nth-child(4n+1){clear:left;} | |
.auto-clear .col-md-4:nth-child(3n+1){clear:left;} | |
.auto-clear .col-md-6:nth-child(odd){clear:left;} | |
} | |
@media (min-width:768px) and (max-width:991px){ | |
.auto-clear .col-sm-1:nth-child(12n+1){clear:left;} | |
.auto-clear .col-sm-2:nth-child(6n+1){clear:left;} | |
.auto-clear .col-sm-3:nth-child(4n+1){clear:left;} | |
.auto-clear .col-sm-4:nth-child(3n+1){clear:left;} | |
.auto-clear .col-sm-6:nth-child(odd){clear:left;} | |
} | |
@media (max-width:767px){ | |
.auto-clear .col-xs-1:nth-child(12n+1){clear:left;} | |
.auto-clear .col-xs-2:nth-child(6n+1){clear:left;} | |
.auto-clear .col-xs-3:nth-child(4n+1){clear:left;} | |
.auto-clear .col-xs-4:nth-child(3n+1){clear:left;} | |
.auto-clear .col-xs-6:nth-child(odd){clear:left;} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="row auto-clear"> | |
<div class="col-xs-6 col-sm-4 col-md-4 col-lg-3"> | |
<p>Hey</p> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment