I didn’t have any custom CSS for gallery images originally. But using the class name you gave me I’ve made media queries for each phone size to keep adjusting the size of the gallery like this:
*full desktop*
.images.nickx_product_images_with_video.show_lightbox {
max-width:600px;
}
*medium-small screens*
@media screen and (max-width: 1024px) {
.images.nickx_product_images_with_video.show_lightbox {
max-width:375px;
}
}
*phone sizes to keep gallery from exceeding device width*
@media screen and (max-width: 768px) {
.purchase-product .product.type-product {align-items:center;}
.images.nickx_product_images_with_video.show_lightbox {
max-width:370px;
}
}
@media screen and (max-width: 430px) {
.images.nickx_product_images_with_video.show_lightbox {
max-width:400px;
}
}
@media screen and (max-width: 400px) {
.images.nickx_product_images_with_video.show_lightbox {
max-width:370px;
}
}
@media screen and (max-width: 360px) {
.images.nickx_product_images_with_video.show_lightbox {
max-width:350px;
}
}
Curious if there’s any more efficient way to do this in your opinion?
Normally your gallery automatically matches the device width. On my theme, it doesn’t and it keeps abiding by your original nickx-front.css declaration (below) even if it’s in an area 360px wide:
.images.nickx_product_images_with_video {
max-width: 700px;
}
I really appreciate your help! ??