Hi Irina
Are you using the gallery shortcode for listing the images?
Kind regards
Thread Starter
Anonymous User 9824923
(@anonymized-9824923)
Hallo @prashantvatsh, I hope you’re fine. I’m using the gallery. I create in a page and choose this page to show in the text area.
If you see in my front page PERSONAGENS CHICK-LIT I have a few galleries; I’m trying to use the same size the images appear in the 1st gallery where the “images” are SVG files. I need to reduce my homepage size.
There’s an option https://prnt.sc/t8pvj9 to change the image size. If you want a custom size then you have to register a new image size in WordPress using https://developer.wordpress.org/reference/functions/add_image_size/.
Thread Starter
Anonymous User 9824923
(@anonymized-9824923)
Hum, there’s no way to do it without the functions? With css just for the specific gallery?
For the second gallery, please try the following CSS code:
.home div#gallery-4 .gallery-item img {
width: 200px; // made width 200px
}
Thread Starter
Anonymous User 9824923
(@anonymized-9824923)
Hallo @prashantvatsh I tested the code, it didn’t work. I even tried to replace the .home for the page id 77
I’m doomed hahaha.
Did you try the ‘important’ rule? Try replacing width: 200px; with width: 200px !important;
Thread Starter
Anonymous User 9824923
(@anonymized-9824923)
Hallo! I’ve tried
.home div#gallery-4 .gallery-item img {
width: 200px!important;
}
and
.home div#gallery-4 .gallery-item img {
width: 200px!important; // made width 200px
}
also both codes with the page id 77
I hope you’re fine. Thanks for trying to help me.
Have you removed another gallery from your page? For the current gallery if you want to make 200*200px then please try the following CSS:
.home div#gallery-2 .gallery-item img {
width: 200px !important;
}
Thread Starter
Anonymous User 9824923
(@anonymized-9824923)
There is only one gallery, I removed the svg gallery.
.home div#gallery-2 .gallery-item img {
width: 200px !important;
}
Please try this CSS for the current existing gallery.
Thread Starter
Anonymous User 9824923
(@anonymized-9824923)
Now it is working like a charm, so before you go, if I want to use that code in the future for another gallery I use
.page-id-13530 div#gallery-2 .gallery-item img {
width: 160px!important;
}
for example? i change the .home for the page id?
You need to check the gallery ID as well. For the current gallery it is gallery-2 so we are using #gallery-2. On the other page it may change so you need to change that as well. Rest is fine.
Kind Regards
Thread Starter
Anonymous User 9824923
(@anonymized-9824923)
Oh I see, I like to learn. I will have that in mind, page id and gallery id. With that I’ll be able to work out my non svg galleries.
AGAIN: THANK YOU SO MUCH FOR THE HELP. You really gave my website a boost with that.
I wish you the best and take care of yourself. Big hug.