Change image size on category page

Hi!

I’d like to change the size of the images on a specific category page. I’ve tried to edit the code but the image is always taking the full width. Could you help me do this please?

I’d like these images on this page to be made smaller:

Many thanks!
Ramya

Hi There,

To resize the images on the category pages, please add the following CSS under Customizer > Custom > Global CSS:

.category .entry-content.content img {
    max-width: 50%;
    margin: 0 auto;
    display: block;
}

Hope it helps :slight_smile:

Hello! Thanks for that. I’ve added the code but I don’t see any changes reflect at the moment :frowning:

Anything else I can do?

Thanks!
Ramya

Hi Ramya,

Where did you add the given CSS code? I am not seeing it?

I just tested the code provided and it works.

screenshot

Since you have X version 3, add the code on Appearance > Customize > Custom > CSS.
Please clear your browser’s cache before previewing the page.

Cheers!

Hi,

Thanks for your message. I’m actually looking to reduce the size of the image by about 80% without changing the alignment (it can be left-aligned, not on the centre of the page). I tried to change the "50%’ parameter in the code, but it won’t work with that. Could you help me reduce the size slightly and retain the same margins please?

Thanks so much!

Ramya

Hi again,

To do this, you can replace the previous code with this:

.category .entry-content.content img {
    max-width: 30%;
}

Feel free to adjust the percentage value. Hope this helps!

Great, thanks so much! :slight_smile:

You’re welcome.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.