I'm working on theming an image gallery in Drupal 7 I created, through which a user uploads several images and as a result see a list of images on the page.
I use Responsive Images and Styles module so the images don't have a fixed size. The effect I want to have is that these images align in a row and are always centered, having equal spaces/gutter width between them, regardless of browser resizing. So adding media queries the final result will be a one column page, so one image top of another, in iPhone viewport and three-four column page, images lying side by side, on a desktop screen.
The complicated part is Drupal has so many divs one inside another and I'm not sure if I'm following the right steps to achieve this effect. Though it could be simple it became problematic with these recursive divs.
So if someone can guide me through these divs and help me figure out how to achieve this aligment I would be really grateful. Every reply counts for me so don't hesitate to come up with comments and solutions of every kind.
Thank you in advance!