Flex Center problem (can someone help me please?)

Hello, I have images. It could be 1, 2, 3, ....30 images. I would like to center the images. When the images are overflow I would like to use scroll. My problem is when the images are more than with I cannot see the first ones. Scroll bar is there but because of center cannot see all the images. If I use space-evenly or else, when only few images those are not centered. Here is an example: https://codepen.io/lanszelot/pen/KwPBXVL
--Link deleted: personal data-- please check Donga Zoltán , he have lot of images How can I center and see all the images?
6 Replies
John Patrick Onyango
just remove justify-content center from the div with #test id
lanszelot
lanszelotOP7d ago
and how it will be centered?
John Patrick Onyango
you can center the container holding the images div , i.e giving the div with .images class display flex with justify content center
John Patrick Onyango
incase you want even space between the images just add gap
lanszelot
lanszelotOP6d ago
Sorry, I just realized I made a mistype. One div missed from the example. On my site working totaly different. I am so confused. --Link deleted: personal data-- please check Donga Zoltán , he have lot of images How can I center the images? first and last child of the image added margin left/right auto

Did you find this page helpful?