I have a fairly simple problem with HTML / CSS, which is also often asked, but, unfortunately, I could not get it to work even after my research.
I am using Bootstrap (3 RC2) and I would like to vertically align the image in the middle of the line.
<div class="row"> <div class="col-xs-10 col-md-6" id="main"> <p><img src="http://placekitten.com/500/700" alt="" width="500" height="700" /></p> </div> <div class="col-xs-1 col-md-1" style="display: inline-block; vertical-align: middle;"> <img src="http://placekitten.com/100/116" width="100" height="116" /> </div> </div>
The second smaller image should be vertically centered in the middle of the div.row . However, this does not seem to work. You can see the problem using this script: http://jsfiddle.net/veQKY/2/
The requirement not to violate Bootstrap responsiveness i.e. when using a device with a small width, the second image should be stitched horizontally below the first image.
html css twitter-bootstrap
dirkk
source share