简体   繁体   English

提交任何帖子时WordPress间距问题

[英]WordPress Spacing Issue while submitting any Post

I have a wordpress theme. 我有一个WordPress主题。 I wrote a line and hit enter after that I put some initial white spaces to start the paragraph but when I publish the post the initial white spaces to the start of new paragraph not appears in that post. 我写了一行然后按回车键,然后在其中放置了一些初始空白以开始该段落,但是当我发布帖子时,到新段落开头的初始空白并未出现在该帖子中。 eg 例如

This is my first post. 这是我的第一篇文章。

             This is my first first post.

After publishing in wordpress it shows: 在wordpress中发布后,它显示:

This is my first post. 这是我的第一篇文章。

This is my first post. 这是我的第一篇文章。

Can anyone please help me? 谁能帮帮我吗?

For inline spacing you can use   对于行间距,您可以使用  inside the wordpress editor. 在wordpress编辑器中。 Use it like         to space 3 times. 间隔3次。 Hope this helps. 希望这可以帮助。

Don't use spaces to indent your paragraphs. 不要使用空格使段落缩进。 Instead target your paragraphs with the CSS text-indent property in your theme's CSS. 而是使用主题CSS中的CSS text-indent属性将段落定位。 The indentation of a paragraph is presentation , and should be controlled by the CSS. 段落的缩进是presentation ,应由CSS控制。 The paragraphs themselves are content, and shouldn't have their presentation hardcoded into the HTML. 段落本身就是内容,不应将其演示文稿硬编码到HTML中。

Separating the presentation into the CSS leaves you free to change/remove all the indentation at once any time later just by editing a single line of code, rather than having to edit every paragraph you've ever written. 将演示文稿分离到CSS中后,您只需编辑一行代码即可随意更改/删除所有缩进,而不必编辑曾经编写的每个段落。

 /* Use whatever selector will target your post's paragraphs in your theme's style.css */ p { text-indent: 24px; } 
 <p>This is a paragraph. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras at elit nibh, in pretium tellus. Donec id dui mi. Nam malesuada, velit sed porta mollis, dolor felis eleifend diam.</p> <p>Here's another one. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras at elit nibh, in pretium tellus. Donec id dui mi. Nam malesuada, velit sed porta mollis, dolor felis eleifend diam.</p> 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM