最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

posts - How to center all text body in single.php at once?

programmeradmin0浏览0评论

I'd like to center all of the text bodies (or content body before "read more") of all posts (in single.php) at once with simple (or advanced) code. How can i do that?

I'd like to center all of the text bodies (or content body before "read more") of all posts (in single.php) at once with simple (or advanced) code. How can i do that?

Share Improve this question asked Jun 1, 2019 at 19:15 vordinerdovordinerdo 54 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

There is probably some CSS you can add via Additional CSS (in Theme CUstomization) that you could use. Use the Inspector tool of your browser (F12) to see the CSS 'class' element used in the content. If the class is called 'the_content', then add this to your Additional CSS:

.the_content{text-align:center !important;}

You might need this, if the content is inside 'p' tags:

.the_content p {text-align:center !important;}

Adjust it for what you like (you may not need the !important). In the Inspector, you can add CSS stuff to that element to try things out. There are googles/bings/ducks on how to use the Inspector.

发布评论

评论列表(0)

  1. 暂无评论