Home > Article > CMS Tutorial > How to center WordPress images
When many people use wordpress, some people always ask this question, why can I freely control the left, right and center display of pictures in the wordpress editor? Is the text surrounding the picture, but it cannot be displayed when it reaches the front desk? They are all on the left, and the style is messy.
Log in to the WordPress backend and enter the WordPress theme editor.
Add the following code at the end of stype.css
/*Alignment*/ .alignleft { display:inline; float:left; margin-right:1.625em; } .alignright { display:inline; float:right; margin-left:1.625em; } .aligncenter { clear:both; display:block; margin-left:auto; margin-right:auto; }
For more wordpress-related technical articles, please visit wordpress tutorial Column for learning!
The above is the detailed content of How to center WordPress images. For more information, please follow other related articles on the PHP Chinese website!