Update: Plnkr available here to demonstrate: http://plnkr.co/edit/i6ngfaMgSE0XGZq3VuBW?p=preview (although you need to widen the "preview" window so that the responsive stuff doesn't kick in.
So I'm trying to use Twitter Bootstrap's thumbnails
and thumbnail
classes to produce an image-gallery type effect, however I'm having trouble trying to get the images to all align properly.
All the thumbnails being retrieved from the server are scaled uniformly so that they fit in a 200px X 200px image. However, sometimes they are much wider than tall (200px X 100px) and vice-versa (100px X 200px). What I want is to have all my images vertically and horizontally centred within the row they are on. So for example in this:
I'd like testImage
, testImage2
and testImage3
to be moved down in their containers so that the tags all lined up.
Here's the HTML (with some AngularJS bindings):
<div class="container" ng-controller="StaticDataManagementCtrl">
<div class="row">
<div class="span12">
<tabset>
<tab heading="Text" select="loadTextLibrary()">
<div class="row"></div>
</tab>
<tab heading="Images" select="loadImageLibrary()">
<div class="row-fluid">
<ul class="thumbnails">
<li class="span3" ng-repeat="image in staticImages">
<div class="thumbnail">
<img ng-src="/api/static/images/{{image._id}}/thumb">
<h3>{{image.name}}</h3>
<p>Some sample description</p>
</div>
</li>
</ul>
</div>
</tab>
<tab heading="Health Mark" select="loadHealthMarkLibrary()"></tab>
</tabset>
</div>
</div>
</div>