Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The latest bootstrap comes with a <code>.caption</code> class that you can add to your thumbnail grid, you can place it above or below your media grid quite easily and it works like so:</p> <pre><code>&lt;ul class="thumbnails"&gt; &lt;li class="span2"&gt; &lt;div class="caption"&gt; &lt;h5&gt;Caption above&lt;/h5&gt; &lt;/div&gt; &lt;a class="thumbnail" href="#"&gt; &lt;img alt="" src="http://placehold.it/160x120"&gt; &lt;/a&gt; &lt;/li&gt; &lt;li class="span2"&gt; &lt;a class="thumbnail" href="#"&gt; &lt;img alt="" src="http://placehold.it/160x120"&gt; &lt;/a&gt; &lt;div class="caption"&gt; &lt;h5&gt;Caption below&lt;/h5&gt; &lt;/div&gt; &lt;/li&gt; &lt;li class="span2"&gt; &lt;a class="thumbnail" href="#"&gt; &lt;img alt="" src="http://placehold.it/160x120"&gt; &lt;/a&gt; &lt;div class="caption"&gt; &lt;h5&gt;Caption below&lt;/h5&gt; &lt;/div&gt; &lt;/li&gt; &lt;li class="span2"&gt; &lt;div class="caption"&gt; &lt;h5&gt;Caption above&lt;/h5&gt; &lt;/div&gt; &lt;a class="thumbnail" href="#"&gt; &lt;img alt="" src="http://placehold.it/160x120"&gt; &lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; &lt;hr&gt; &lt;ul class="thumbnails"&gt; &lt;li class="span4"&gt; &lt;div class="caption"&gt; &lt;h5&gt;Caption above&lt;/h5&gt; &lt;/div&gt; &lt;a class="thumbnail" href="#"&gt; &lt;img alt="" src="http://placehold.it/160x120"&gt; &lt;/a&gt; &lt;/li&gt; &lt;li class="span4"&gt; &lt;a class="thumbnail" href="#"&gt; &lt;img alt="" src="http://placehold.it/160x120"&gt; &lt;/a&gt; &lt;div class="caption"&gt; &lt;h5&gt;Caption below&lt;/h5&gt; &lt;/div&gt; &lt;/li&gt; &lt;/ul&gt; </code></pre> <p>You can center the caption inside the image container by just modifying the <code>.caption</code> class and adding the <code>text-align: center</code> property, like so:</p> <pre><code>.caption { text-align:center; } </code></pre> <p>Demo: <a href="http://jsfiddle.net/2BBnR/" rel="nofollow noreferrer">http://jsfiddle.net/2BBnR/</a></p> <p><strong>Note</strong> Noticed this post is old, so the other method posted is irrelevant with the latest bootstrap, the <code>.media-grid</code> class is no longer used.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload