Created
July 8, 2016 11:28
-
-
Save sarvar/76c6faf61746b28558880c3e4a7921a0 to your computer and use it in GitHub Desktop.
Responsive Equal Height Boxes for Twitter 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
<div class="flex-row row"> | |
<div class="col-xs-6 col-sm-4 col-lg-3"> | |
<div class="thumbnail"> | |
<div class="caption"> | |
<h3>Title</h3> | |
<p class="flex-text"> Content ...<p> | |
<p><a class="btn btn-primary" href="#">Link</a></p> | |
</div> | |
</div> | |
</div> | |
</div> | |
************** | |
style: | |
@media only screen and (min-width : 481px) { | |
.flex-row.row { | |
display: flex; | |
flex-wrap: wrap; | |
} | |
.flex-row.row > [class*='col-'] { | |
display: flex; | |
flex-direction: column; | |
} | |
.flex-row.row:after, | |
.flex-row.row:before { | |
display: flex; | |
} | |
} | |
.flex-row .thumbnail, | |
.flex-row .caption { | |
flex:1 0 auto; | |
flex-direction:column; | |
} | |
.flex-text { | |
flex-grow:1 | |
} | |
.flex-row img { | |
height:auto; | |
width:100% | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment