title: Horizontally center a responsive image in Bootstrap
body: <p>If an image with <code>.img-responsive</code> class has less width than the container width then it displays as aligned to left. Adding <code>.text-center</code> to parent element does not seem to work. Here is an example:</p>
  
  <pre><code>&lt;div class="col-sm-12 text-center"&gt;
    &lt;img src="path/to/image.jpg" alt="Example Image" class="img-responsive" /&gt;
  &lt;/div&gt;
  </code></pre>