I have reviewed all existing questions / answers and still cannot get a working solution, so I would appreciate any comments on my specific code below.
I would prefer not to use hard-coded image sizes (number of pixels) in my code, and I'm ready to use a combination of Less, CSS, or Javascript in the solution.
The image should be centered vertically and horizontally inside the Bootstrap column and remain centered even when the screen is resized.
My HTML:
<div class="container-fluid"> <div class="container"> <div class="row"> <div class="col-md-5"> <div class="panel"> Some content </div> </div> <div class="col-md-2"> <img src="images/myimage.png" class="img-responsive center-block"> </div> <div class="col-md-5"> <div class="panel> Some content </div> </div> </div> </div> </div>
source share