简体   繁体   English

为什么我为wordpress主题定制的CSS在cpanel上不起作用?

[英]Why my customized CSS for a wordpress theme is not working from cpanel?

I am trying to update the CSS of a theme I am using. 我正在尝试更新正在使用的主题的CSS。 To test if it works, I am display: none to a div . 为了测试它是否有效,我在display: none to div
Firstly I tried customizing the main style.css file of that theme 首先,我尝试自定义该主题的主要style.css文件

.comment-avatar {
    display: table-cell;
    width: 92px;
    margin: 0;
    vertical-align: top;
}

I set it to 我将其设置为

.comment-avatar {
    display: none;
    width: 92px;
    margin: 0;
    vertical-align: top;
}

It's not working. 没用 But it does work if I edit it from "Addtional CSS" or "Custom CSS" provided in wordpress. 但是,如果我从wordpress中提供的“其他CSS”或“自定义CSS”中进行编辑,它确实可以工作。 But both of these increases the load time of my website. 但是,这两者都增加了我网站的加载时间。

I am looking around for a way to customize the main CSS file of that theme. 我正在寻找一种自定义该主题的主要CSS文件的方法。

Edit : I am updating the theme's style.css but browser I am seeing that the style is applied from 'style.min.css' file which is also on the root. 编辑 :我正在更新主题的style.css但浏览器中看到该样式是从同样位于根目录上的'style.min.css'文件应用的。 Aren't my changes to 'style.css' not reflected intp style.min.css automatically? 我对'style.css'的更改不会自动反映为intp style.min.css吗?

浏览器

To your CSS, try to give !important tag as shown below 对于您的CSS,请尝试赋予!important标记,如下所示

.comment-avatar {
    display: none !important;
    width: 92px;
    margin: 0;
    vertical-align: top;
}

and then clear the cache. 然后清除缓存。

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

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