Created
March 16, 2015 14:20
-
-
Save edm00se/27e48d0168c96f90a7b0 to your computer and use it in GitHub Desktop.
Responsive Bootstrap 3 column divs of equal height (for the row).
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
/* | |
* Provides Bootstrap 3 compatible classes for making responsive rows and columns consistently formatted for height. | |
* src: http://www.minimit.com/articles/solutions-tutorials/bootstrap-3-responsive-columns-of-same-height | |
*/ | |
/* columns of same height styles */ | |
.row-same-height { | |
display: table; | |
width: 100%; | |
} | |
.col-xs-height { | |
display: table-cell; | |
float: none !important; | |
} | |
@media (min-width: 768px) { | |
.col-sm-height { | |
display: table-cell; | |
float: none !important; | |
} | |
} | |
@media (min-width: 992px) { | |
.col-md-height { | |
display: table-cell; | |
float: none !important; | |
} | |
} | |
@media (min-width: 1200px) { | |
.col-lg-height { | |
display: table-cell; | |
float: none !important; | |
} | |
} | |
/* vertical alignment styles */ | |
.col-top { | |
vertical-align:top; | |
} | |
.col-middle { | |
vertical-align:middle; | |
} | |
.col-bottom { | |
vertical-align:bottom; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment