Specifying image width does work in one instance, but not the other

Dear support,

I use the following code to specify the size of the book on my homepage website (last row before footer). https://howtogetrippedathome.com

#pg-977-7 .image.wp-image-2783.attachment-medium.size-medium {
padding-top: 50px;
display: block;
margin-left: auto;
margin-right: auto;
width: 80%;
}

However, when using the following code on another page, it doesn’t work. https://howtogetrippedathome.com/free-workout

#pg-1552-4 .image.wp-image-2783.attachment-medium.size-medium {
display: block;
margin-left: auto;
margin-right: auto;
width: 50%;
}

How can this be? In my eyes, this exactly the same code.

I hope you can help me! Thanks in advance for taking the time!

Best,
Maarten

Hello Maarten,

You are using different widget on free workout page (SiteOrigin image widget), therefore CSS selector also should be different (since that widget assigns different image classes).

Try something like this:
#panel-1552-4-1-0 img

…instead of this:
#pg-1552-4 .image.wp-image-2783.attachment-medium.size-medium

Kind Regards, Roman.

Aah stupid, sorry for the hassle! It worked, thank you.

That’s okay Maarten, you are welcome! :slight_smile:

Please feel free to ask any other questions that you might have in future.

Kind Regards, Roman.