title: How to extend Twitter Bootstrap image carousel for dynamically sized, centered images
body: <p>I'm trying to extend the default Bootstrap image carousel to support dynamically sized images (500x400 max), centered both horizontally and vertically.  Additionally, I'd like to maintain the original caption layout, which anchors the caption to the bottom of the image, with the caption div extending fully across the image (but no further.)</p>
  
  <p>I've put together a fiddle, which is a fairly clean implementation of the default Bootstrap setup (there are only 4 additional styles at the end of the css section): </p>
  
  <p><a href="http://jsfiddle.net/rdugan/JFBFU/26/" rel="noreferrer">http://jsfiddle.net/rdugan/JFBFU/26/</a></p>
  
  <p>I can fairly easily accomplish the horizontal centering and caption requirements by adding a surrounding 'inline' div around the image and caption, and using 'text-align: center' on the parent.  However, the vertical centering remains a problem (as always.)  </p>
  
  <p>As an alternative, I've also tried using 'display: table-cell' (and the accompanying centering styles) on different divs with varying results - in some cases I mess up the carousel functionality, while in others I accomplish the image centering, but lose the caption anchoring.</p>
  
  <p>Any hints would be greatly appreciated - been banging my head on this one for quite some time.</p>