How to center choosen image in Your WordPress?

Advertisement

Please switch WP editor to "Text" mode and find your code with image. For exammple:

<img class="size-full wp-image-1" title="Image" alt="Image" src="http://example.com/images/image.jpg" width="90" height="60" />

To make the image align centered please add this code above the img tag code:

<p style="text-align:center">

Then please add this code below the img tag code:

</p>

Finally you image code should look like this:

<p style="text-align:center"><img class="size-full wp-image-1" title="Image" alt="Image" src="http://example.com/images/image.jpg" width="90" height="60" /></p>

This code should work in all themes as it is using simple inline CSS.

Hope this helps!

Advertisement

Technology we use