👋🏼Welcome to my WP-Host blog where I am excited to share my knowledge and expertise on WordPress hosting and website construction tutorials with you. Let’s connect and learn from each other! You can reach me at info@yrshare.com.
Keep sharing wordpress tutorials. When we edit the content of the website, we generally choose to center the picture, which can make the overall layout look more beautiful. Some wordpress website building themes may have the function of centering pictures, but most of them do not.
So under normal circumstances we will manually set the picture drama. Select the picture in the wordpress block editor, and then set it as shown above to center the picture. If you have pictures in each article that need to be centered on the device, then this operation may be too troublesome. Next, I will share with you two methods.
Table of Contents
Method 1: Increase the image size
Under normal circumstances, wordpress theme templates have a maximum image display size. Assuming that the maximum display size of your WordPress theme is 800 PX, then you only need to give each article a picture greater than or equal to 800 PX, so that the picture will be spread horizontally, and the display effect is the same as that of centering.
Method 2: Set CSS style
Add the following CSS style to the style.css file of the current wordpress website building theme and save it, and then clear the cache, so that the pictures of future articles will be automatically displayed.