Skip to content

Instantly share code, notes, and snippets.

@edm00se
Created March 16, 2015 14:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edm00se/27e48d0168c96f90a7b0 to your computer and use it in GitHub Desktop.
Save edm00se/27e48d0168c96f90a7b0 to your computer and use it in GitHub Desktop.
Responsive Bootstrap 3 column divs of equal height (for the row).
/*
* 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