SPHK Posted March 28, 2021 Share Posted March 28, 2021 (edited) Site URL: https://www.stephencheung.co/nyc Hi, I want to set my images to display in same ratio and same dimension in gallery grid, both vertical and horizontal images. Just like the website below, showing both vertical and horizontal are in the same dimension even putting them in same grid. http://alanschaller.com/streetphotography I've do a research and can't figure out how to do that, please help. Thank you. Edited March 29, 2021 by SPHK Link to comment
SPHK Posted March 30, 2021 Author Share Posted March 30, 2021 On 3/28/2021 at 10:40 AM, SPHK said: Site URL: https://www.stephencheung.co/nyc Hi, I want to set my images to display in same ratio and same dimension in gallery grid, both vertical and horizontal images. Just like the website below, showing both vertical and horizontal are in the same dimension even putting them in same grid. http://alanschaller.com/streetphotography I've do a research and can't figure out how to do that, please help. Thank you. added CSS code: .gallery-grid-item img{ object-fit: contain !important; } .gallery-grid-item { margin: 50px 2px; } .gallery-grid-item img { object-fit: cover; width: 100%; } and still not the result I want, anyone can help ? sample: Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment