简体   繁体   English

Wordpress字体真棒图标CSS填充问题

[英]Wordpress Font Awesome Icons CSS Padding Issues

I have trawled the internet looking for a fix and i still cannot get padding to work on my FA Icons in a wordpress theme. 我已经在网上拖网寻找解决方法,但仍然无法在wordpress主题的FA图标上进行填充。

Caution, I am novice: 警告,我是新手:

So, the icons are social media icons, using FA, and they are placed in a widget in the footer of the site. 因此,这些图标是使用FA的社交媒体图标,它们放置在网站页脚的小部件中。

I think i have assigned a class to the icons "social" but I have placed: 我认为我已为图标“社交”分配了一个类别,但我放置了:

.social {
    padding-left:20px;
}

In all style.css or custom.css or theme related .css's I can find and the icons still only have around 3px of padding, widget code is as follows: 在所有style.css或custom.css或与主题相关的.css中,我都可以找到并且图标仍然只有3px的填充,小部件代码如下:

<p>
<a target="_blank" href="link"><i class="fa fa-twitter-square fa-4x" class="social"></i></a>
<a target="_blank" href="link"><i class="fa fa-facebook-square fa-4x" class="social"></i></a>
<a target="_blank" href="link"><i class="fa fa-instagram fa-4x" class="social"></i></a>
<a target="_blank" href="link"><i class="fa fa-pinterest-square fa-4x" class="social"></i></a>
</p>

I'm sure I am missing something simple? 我确定我缺少一些简单的东西吗?

Regards, 问候,

Thomas 托马斯

Add the social class to the same attribute: social类添加到同一属性:

<i class="fa fa-pinterest-square fa-4x social"></i>

Change the css property to: 将css属性更改为:

.social {
    padding-left:20px !important;
}

Please note that the css properties are assigned in the order they were defined in the css files. 请注意,css属性是按照它们在css文件中定义的顺序分配的。 You must be sure that the .social is the last defined, in order to assign the padding-left you need. 您必须确保.social是最后定义的,以便分配所需的padding-left

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

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