title: How to center an image in a table td?
body: <p>I want to center (center+middle) an image, and the title inside h2, in a table column (td) </p>
  
  <p>CSS</p>
  
  <pre><code>.centered
  {
      text-align:center;
  }
  </code></pre>
  
  <p>HTML</p>
  
  <pre><code>&lt;table class="table table-bordered"&gt;
  &lt;tbody&gt;
  
  &lt;tr&gt;
      &lt;td class="centered"&gt;&lt;%= image_tag(prank.image_url, :size =&gt; "50x50") %&gt;&lt;/td&gt;
      &lt;td class="centered"&gt;&lt;h2&gt;&lt;%=prank.category.titleize%&gt;&lt;/h2&gt;&lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/wwZFU.png" alt="enter image description here"></p>
  
  <p>I'm using Twitter Bootstrap</p>