Created
January 16, 2017 17:43
-
-
Save sarvar/261d95a5c298e1f93f314435d08c9e44 to your computer and use it in GitHub Desktop.
Force bootstrap responsive image to be square
This file contains 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="col-sm-6"> | |
<a href="#" class="thumbnail"> | |
<div class="caption"> | |
title<br/>3 x bekeken | |
</div> | |
<div class="image"> | |
<img src="" class="img img-responsive full-width" /> | |
</div> | |
</a> | |
</div> | |
.image{ | |
position:relative; | |
overflow:hidden; | |
padding-bottom:100%; | |
} | |
.image img{ | |
position:absolute; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment