Last active
August 29, 2015 14:03
-
-
Save edm00se/8ad4d0f298c891c44f2a to your computer and use it in GitHub Desktop.
Consistent responsive row column height in Bootstrap 3.
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