Help with centering page or post featured image on mobile or tablet devices only

I was wondering if there was a simple css solution that will allow the featured image in my posts and pages be centered when viewed on a mobile device or tablet, but formatted as I have selected on a laptop or desktop.

Many thanks!

http://elusivequill.com

Hello there,

Could you please try to apply the following CSS code through the Simple Custom CSS plugin or child theme’s style.css?

@media only screen and (max-width:991px){
  img[class^="wp-image-"]{
    float: none;
    display: block;
    margin-left: auto;
    margin-right: auto;
  }
}

Regards,
Kharis

Hi Kharis,

Brilliant. Thank you. That worked perfectly.

Daniel

Hello there,

Thank you for updating me.

I am glad to know that worked for you.

Please let us know in a new topic if you have any further questions, or if we can provide you with any other assistance.

Regards,
Kharis