How to get multiple images to auto resize and stay centered within a div
Not sure what HTML you’ve already got, but if the images are each wrapped inside a <div> or <li> then you can use display: table; and display: table-cell to ensure that no matter how many images, they’ll always fit the width correctly. Expand snippet Working demo here.