How to center images on mobile only (the7)

Hello,

I’m looking to center my images in my posts on mobile only as they’re centered to the right on desktop.
A good example here: https://www.lifetolegend.com/art-articles/adult-jellyfish-for-creatives/

How can I make that happen?
Thanks!

You target mobile in CSS based on the display width, like this:

@media only screen and (max-width: 768px) {
// Mobile-specific CSS here
}

And then, depending on your code or theme, something like this for the actual CSS:

img {
display: block;
margin: 0 auto;
}

Hey Meekeboose,

thank you for your reply! However, I’m very new to Wordpress and don’t know any coding so I’m not entirely sure where I can find this, or how I can edit it. Also, I cannot code… Could you elaborate a bit if you have the time?

Thank you!

Hello,

I’m looking to center my excerp displayed right underneath the first photo (https://www.lifetolegend.com/art-articles/adult-jellyfish-for-creatives/) throughout all my posts. How do I do that?

Thanks!