Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
将填充/字体大小属性应用于整个wordpress帖子_Wordpress_Post_Padding_Font Size - Fatal编程技术网

将填充/字体大小属性应用于整个wordpress帖子

将填充/字体大小属性应用于整个wordpress帖子,wordpress,post,padding,font-size,Wordpress,Post,Padding,Font Size,如何为整个wordpress帖子设置标准字体大小和填充 例如,目前我对每个段落使用p style=“padding right:30px;padding left:60px;font size:large”,标题标记除外 有更好的方法吗?如果您使用类似的方法,它将应用于所有段落 .post-class p { padding-right: 30px; padding-left: 60px; font-size: large; } 您可能需要根据主题使用的内容调整.pos

如何为整个wordpress帖子设置标准字体大小和填充

例如,目前我对每个段落使用
p style=“padding right:30px;padding left:60px;font size:large”
,标题标记除外


有更好的方法吗?

如果您使用类似的方法,它将应用于所有段落

.post-class p {
    padding-right: 30px;
    padding-left: 60px;
    font-size: large;
}

您可能需要根据主题使用的内容调整.post类。

听起来您想使用CSS(层叠样式表)()

对于当前示例,您可以使用以下方法将样式应用于页面上的每个
元素:

<style type="text/css">
p {
  padding-right: 30px;
  padding-left: 60px;
  font-size: large;
}
</style>

p{
右侧填充:30px;
左侧填充:60px;
字体大小:大号;
}
您还可以将内容(不包括
标记)放入外部文件(.css),然后使用
对文件进行寻址。将
元素粘贴到主题的

由于您在Wordpress中工作。。。 您可以打开主题的style.css(或在Wordpress中通过进入仪表板中的
Appearance>Editor
对其进行编辑)。只需将上面的内容(同样,没有样式标签)放在样式表底部附近。如果只想在帖子正文中设置
元素的样式,则可以对显示的每个帖子使用选择器
div.post p{…
。而不是简单的
p{…
。WordPress使用