Currently, I am developing an application that showcases the 9 newest photos with a specific tag. To ensure consistency in image sizes, I have set each photo to be 240px wide and 200px tall.
My query now is how can I vertically center these images so they appear in the middle of the screen's width? I am aiming for a responsive design where the images always stay centered regardless of the device's width.
In my HTML setup:
<div id="results" class="row"></div>
I have tried numerous solutions found online without success. It's important to note that there are 9 photos displayed which users will need to scroll through. Any solution involving position: absolute; would not be suitable in this case.
The photos are fetched using the Flickr API and then appended to div#results using:
$("#results").append('<div class="miniature col-xs-12 col-sm-4 col-md-4 col-lg-4"><a href="'+myresult_size.url+'" target="_blank"><img src="'+myresult_size.source+'" ></a></div>');
Despite using Bootstrap's grid system, I have faced challenges in centering the images.